﻿Module LoadAbility
    Public Sub ShowAbility(ByVal Initial As String, ByVal Password As String)
        MainProgram.AbilityData_List = ""
        MainProgram.AbilityData = MainProgram.GetFileContents(MainProgram.DirAbilities, MainProgram.sErr)
        Dim astring As String
        astring = MainProgram.AbilityData
        If MainProgram.sErr = "" Then
            Dim tempvar As Integer = InStr(MainProgram.AbilityData, "TOTAL#")
            Dim tempvar2 As Integer, tempvar3 As Integer, tempvar4 As Integer
            Dim AbilityVIRID As String = "3"
            Dim mscstr As String
            Dim stepnum As Integer
            If tempvar > 0 Then
                If Initial = "LoadAbility" And Password = "n4th4ni3l" Then
                    Dim tempd As Integer = 0
                    For tempd = InStrRev(MainProgram.AbilityData, "ANAME#") To Len(MainProgram.AbilityData)
                        If Mid(MainProgram.AbilityData, tempd, 1) = "(" Then
                            Exit For
                        End If
                    Next
                    MainProgram.AbilityData_Total = Mid(MainProgram.AbilityData, InStrRev(MainProgram.AbilityData, "ANAME#") + 6, tempd - InStrRev(MainProgram.AbilityData, "ANAME#") - 6)
                    Dim Tempvarcounter As Integer
                    Dim VarC As String = ""
                    For Tempvarcounter = 1 To Val(MainProgram.AbilityData_Total) Step 1
                        VarC = LTrim(RTrim(Str(Tempvarcounter)))
                        tempvar = InStr(MainProgram.AbilityData, "ANAME#" + VarC + "(")
                        If tempvar > 0 Then
                            For tempvar2 = InStr(MainProgram.AbilityData, "ANAME#" + VarC + "(") To Len(MainProgram.AbilityData) Step 1
                                If Mid(MainProgram.AbilityData, tempvar2, 1) = ")" Then
                                    MainProgram.AbilityData_Name = Mid(MainProgram.AbilityData, InStr(MainProgram.AbilityData, "ANAME#" + VarC + "(") + 7 + Len(VarC), tempvar2 - (tempvar + 7 + Len(VarC)))
                                    MainProgram.AbilityData_List += "|+|" + LCase(MainProgram.AbilityData_Name)
                                    Exit For
                                End If
                            Next
                        Else
                            Exit For
                        End If
                    Next
                Else
                    tempvar = InStr(MainProgram.AbilityData, "(" + Initial + ")")
                    For tempvar2 = InStr(MainProgram.AbilityData, "(" + Initial + ")") To Len(MainProgram.AbilityData) Step 1
                        If Mid(MainProgram.AbilityData, tempvar2, 1) = "#" Then
                            Dim aint As Integer
                            For aint = tempvar2 To Len(MainProgram.AbilityData) Step 1
                                If Mid(MainProgram.AbilityData, aint, 1) = "(" Then
                                    AbilityVIRID = Mid(MainProgram.AbilityData, tempvar2 + 1, aint - tempvar2 - 1)
                                    Exit For
                                End If
                            Next
                            Exit For
                        End If
                    Next
                End If
                MainProgram.AbilityData_VIRID = AbilityVIRID
                tempvar = InStr(MainProgram.AbilityData, "SHORT#" + AbilityVIRID + "(")
                If tempvar > 0 Then
                    For tempvar2 = InStr(MainProgram.AbilityData, "SHORT#" + AbilityVIRID + "(") To Len(MainProgram.AbilityData) Step 1
                        If Mid(MainProgram.AbilityData, tempvar2, 1) = ")" Then
                            MainProgram.AbilityData_Short = Mid(MainProgram.AbilityData, InStr(MainProgram.AbilityData, "SHORT#" + AbilityVIRID + "(") + 7 + Len(AbilityVIRID), tempvar2 - InStr(MainProgram.AbilityData, "SHORT#" + AbilityVIRID + "(") - 7 - Len(AbilityVIRID))
                            Exit For
                        End If
                    Next
                End If
                tempvar = InStr(MainProgram.AbilityData, "ANAME#" + AbilityVIRID + "(")
                If tempvar > 0 Then
                    For tempvar2 = InStr(MainProgram.AbilityData, "ANAME#" + AbilityVIRID + "(") To Len(MainProgram.AbilityData) Step 1
                        If Mid(MainProgram.AbilityData, tempvar2, 1) = ")" Then
                            MainProgram.AbilityData_Name = Mid(MainProgram.AbilityData, InStr(MainProgram.AbilityData, "ANAME#" + AbilityVIRID + "(") + 7 + Len(AbilityVIRID), tempvar2 - InStr(MainProgram.AbilityData, "ANAME#" + AbilityVIRID + "(") - 7 - Len(AbilityVIRID))
                            Exit For
                        End If
                    Next
                End If
                tempvar = InStr(MainProgram.AbilityData, "REQUI#" + AbilityVIRID + "(")
                If tempvar > 0 Then : stepnum = 0
                    For tempvar2 = InStr(MainProgram.AbilityData, "REQUI#" + AbilityVIRID + "(") To Len(MainProgram.AbilityData) Step 1
                        If Mid(MainProgram.AbilityData, tempvar2, 1) = ")" Then
                            mscstr = Mid(MainProgram.AbilityData, InStr(MainProgram.AbilityData, "REQUI#" + AbilityVIRID + "(") + 7 + Len(AbilityVIRID), tempvar2 - InStr(MainProgram.AbilityData, "REQUI#" + AbilityVIRID + "(") - 7 - Len(AbilityVIRID))
                            For tempvar3 = 1 To Len(mscstr) + 1 Step 1
                                If Mid(mscstr + ",", tempvar3, 1) = "," Then
                                    If stepnum = 0 Then
                                        If Val(Mid(mscstr, 1, tempvar3 - 1)) = 0 Then
                                            MainProgram.AbilityData_RequiredClass = "None"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 1 Then
                                            MainProgram.AbilityData_RequiredClass = "Priest"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 2 Then
                                            MainProgram.AbilityData_RequiredClass = "Deacon"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 3 Then
                                            MainProgram.AbilityData_RequiredClass = "Archdeacon"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 4 Then
                                            MainProgram.AbilityData_RequiredClass = "Bishop"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 5 Then
                                            MainProgram.AbilityData_RequiredClass = "Archbishop"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 6 Then
                                            MainProgram.AbilityData_RequiredClass = "Woodsman"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 7 Then
                                            MainProgram.AbilityData_RequiredClass = "Tracker"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 8 Then
                                            MainProgram.AbilityData_RequiredClass = "Ranger"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 9 Then
                                            MainProgram.AbilityData_RequiredClass = "Druit"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 10 Then
                                            MainProgram.AbilityData_RequiredClass = "Druid"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 11 Then
                                            MainProgram.AbilityData_RequiredClass = "Gravedigger"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 12 Then
                                            MainProgram.AbilityData_RequiredClass = "Ritualist"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 13 Then
                                            MainProgram.AbilityData_RequiredClass = "Warlock"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 14 Then
                                            MainProgram.AbilityData_RequiredClass = "Necromancer"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 15 Then
                                            MainProgram.AbilityData_RequiredClass = "Liche"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 16 Then
                                            MainProgram.AbilityData_RequiredClass = "Mageling"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 17 Then
                                            MainProgram.AbilityData_RequiredClass = "Mage"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 18 Then
                                            MainProgram.AbilityData_RequiredClass = "Wizard"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 19 Then
                                            MainProgram.AbilityData_RequiredClass = "Magus"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 20 Then
                                            MainProgram.AbilityData_RequiredClass = "Supreme Magi"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 21 Then
                                            MainProgram.AbilityData_RequiredClass = "Hermit"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 22 Then
                                            MainProgram.AbilityData_RequiredClass = "Spellbreaker"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 23 Then
                                            MainProgram.AbilityData_RequiredClass = "Soulreaver"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 24 Then
                                            MainProgram.AbilityData_RequiredClass = "Demi-Psion"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 25 Then
                                            MainProgram.AbilityData_RequiredClass = "Psion"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 26 Then
                                            MainProgram.AbilityData_RequiredClass = "Elementalist"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 27 Then
                                            MainProgram.AbilityData_RequiredClass = "Nihilist"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 28 Then
                                            MainProgram.AbilityData_RequiredClass = "Sorceror"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 29 Then
                                            MainProgram.AbilityData_RequiredClass = "Arcanist"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 30 Then
                                            MainProgram.AbilityData_RequiredClass = "Myrmidon"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 31 Then
                                            MainProgram.AbilityData_RequiredClass = "Headhunter"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 32 Then
                                            MainProgram.AbilityData_RequiredClass = "Mercenary"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 33 Then
                                            MainProgram.AbilityData_RequiredClass = "Savant"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 34 Then
                                            MainProgram.AbilityData_RequiredClass = "Sexton"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 35 Then
                                            MainProgram.AbilityData_RequiredClass = "Warlord"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 36 Then
                                            MainProgram.AbilityData_RequiredClass = "Plainsman"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 37 Then
                                            MainProgram.AbilityData_RequiredClass = "Barbarian"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 38 Then
                                            MainProgram.AbilityData_RequiredClass = "Avenger"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 39 Then
                                            MainProgram.AbilityData_RequiredClass = "Warmonger"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 40 Then
                                            MainProgram.AbilityData_RequiredClass = "Berserker"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 41 Then
                                            MainProgram.AbilityData_RequiredClass = "Pickpocket"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 42 Then
                                            MainProgram.AbilityData_RequiredClass = "Rogue"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 43 Then
                                            MainProgram.AbilityData_RequiredClass = "Thief"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 44 Then
                                            MainProgram.AbilityData_RequiredClass = "Assassin"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 45 Then
                                            MainProgram.AbilityData_RequiredClass = "Shadow Walker"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 46 Then
                                            MainProgram.AbilityData_RequiredClass = "Page"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 47 Then
                                            MainProgram.AbilityData_RequiredClass = "Squire"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 48 Then
                                            MainProgram.AbilityData_RequiredClass = "Knight"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 49 Then
                                            MainProgram.AbilityData_RequiredClass = "Centurion"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 50 Then
                                            MainProgram.AbilityData_RequiredClass = "Templar"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 51 Then
                                            MainProgram.AbilityData_RequiredClass = "Scout"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 52 Then
                                            MainProgram.AbilityData_RequiredClass = "Nu-Dosai"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 53 Then
                                            MainProgram.AbilityData_RequiredClass = "Nubo-Medusai"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 54 Then
                                            MainProgram.AbilityData_RequiredClass = "Ado-Mendusai"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 55 Then
                                            MainProgram.AbilityData_RequiredClass = "Saedu-Morusai"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 56 Then
                                            MainProgram.AbilityData_RequiredClass = "Runescribe"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 57 Then
                                            MainProgram.AbilityData_RequiredClass = "Draconian"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 58 Then
                                            MainProgram.AbilityData_RequiredClass = "Paek'oth"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 59 Then
                                            MainProgram.AbilityData_RequiredClass = "Daek'oth"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 60 Then
                                            MainProgram.AbilityData_RequiredClass = "Tzaek'oth"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 61 Then
                                            MainProgram.AbilityData_RequiredClass = "Monk"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 62 Then
                                            MainProgram.AbilityData_RequiredClass = "Dosai"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 63 Then
                                            MainProgram.AbilityData_RequiredClass = "Medusai"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 64 Then
                                            MainProgram.AbilityData_RequiredClass = "Mendusai"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 65 Then
                                            MainProgram.AbilityData_RequiredClass = "Morusai"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 66 Then
                                            MainProgram.AbilityData_RequiredClass = "Minstrel"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 67 Then
                                            MainProgram.AbilityData_RequiredClass = "Bard"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 68 Then
                                            MainProgram.AbilityData_RequiredClass = "Harlequin"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 69 Then
                                            MainProgram.AbilityData_RequiredClass = "Bladesinger"
                                        ElseIf Val(Mid(mscstr, 1, tempvar3 - 1)) = 70 Then
                                            MainProgram.AbilityData_RequiredClass = "Blademaster"
                                        End If
                                        tempvar4 = tempvar3 + 1
                                        stepnum += 1
                                    ElseIf stepnum = 1 Then
                                        MainProgram.AbilityData_RequiredLevel = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        tempvar4 = tempvar3 + 1
                                        stepnum += 1
                                    End If
                                End If
                            Next
                            Exit For
                        End If
                    Next
                End If
                tempvar = InStr(MainProgram.AbilityData, "ATIME#" + AbilityVIRID + "(")
                If tempvar > 0 Then
                    For tempvar2 = InStr(MainProgram.AbilityData, "ATIME#" + AbilityVIRID + "(") To Len(MainProgram.AbilityData) Step 1
                        If Mid(MainProgram.AbilityData, tempvar2, 1) = ")" Then
                            MainProgram.AbilityData_Time = Mid(MainProgram.AbilityData, InStr(MainProgram.AbilityData, "ATIME#" + AbilityVIRID + "(") + 7 + Len(AbilityVIRID), tempvar2 - InStr(MainProgram.AbilityData, "ATIME#" + AbilityVIRID + "(") - 7 - Len(AbilityVIRID))
                            Exit For
                        End If
                    Next
                End If
                tempvar = InStr(MainProgram.AbilityData, "ACOST#" + AbilityVIRID + "(")
                If tempvar > 0 Then
                    For tempvar2 = InStr(MainProgram.AbilityData, "ACOST#" + AbilityVIRID + "(") To Len(MainProgram.AbilityData) Step 1
                        If Mid(MainProgram.AbilityData, tempvar2, 1) = ")" Then
                            mscstr = Mid(MainProgram.AbilityData, InStr(MainProgram.AbilityData, "ACOST#" + AbilityVIRID + "(") + 7 + Len(AbilityVIRID), tempvar2 - InStr(MainProgram.AbilityData, "ACOST#" + AbilityVIRID + "(") - 7 - Len(AbilityVIRID))
                            If InStr(mscstr, "%") Then
                                MainProgram.AbilityData_Cost = mscstr 'seperated it in this if for future
                            Else 'incase i want to expand it to accomidate dissection here in this or
                                MainProgram.AbilityData_Cost = mscstr 'alternatively i can just remove this
                            End If 'later if i find a faster way and won't need to expand this.
                            Exit For
                        End If
                    Next
                End If
                tempvar = InStr(MainProgram.AbilityData, "EXHAU#" + AbilityVIRID + "(")
                If tempvar > 0 Then
                    For tempvar2 = InStr(MainProgram.AbilityData, "EXHAU#" + AbilityVIRID + "(") To Len(MainProgram.AbilityData) Step 1
                        If Mid(MainProgram.AbilityData, tempvar2, 1) = ")" Then
                            mscstr = Mid(MainProgram.AbilityData, InStr(MainProgram.AbilityData, "EXHAU#" + AbilityVIRID + "(") + 7 + Len(AbilityVIRID), tempvar2 - InStr(MainProgram.AbilityData, "EXHAU#" + AbilityVIRID + "(") - 7 - Len(AbilityVIRID))
                            If mscstr = "1" Then
                                MainProgram.AbilityData_Exhausted = True
                            Else
                                MainProgram.AbilityData_Exhausted = False
                            End If
                            Exit For
                        End If
                    Next
                End If
                tempvar = InStr(MainProgram.AbilityData, "BATOU#" + AbilityVIRID + "(")
                If tempvar > 0 Then
                    For tempvar2 = InStr(MainProgram.AbilityData, "BATOU#" + AbilityVIRID + "(") To Len(MainProgram.AbilityData) Step 1
                        If Mid(MainProgram.AbilityData, tempvar2, 1) = ")" Then
                            mscstr = Mid(MainProgram.AbilityData, InStr(MainProgram.AbilityData, "BATOU#" + AbilityVIRID + "(") + 7 + Len(AbilityVIRID), tempvar2 - InStr(MainProgram.AbilityData, "BATOU#" + AbilityVIRID + "(") - 7 - Len(AbilityVIRID))
                            If mscstr = "1" Then
                                MainProgram.AbilityData_OutsideBattle = True
                            Else
                                MainProgram.AbilityData_OutsideBattle = False
                            End If
                            Exit For
                        End If
                    Next
                End If
                tempvar = InStr(MainProgram.AbilityData, "BATIN#" + AbilityVIRID + "(")
                If tempvar > 0 Then
                    For tempvar2 = InStr(MainProgram.AbilityData, "BATIN#" + AbilityVIRID + "(") To Len(MainProgram.AbilityData) Step 1
                        If Mid(MainProgram.AbilityData, tempvar2, 1) = ")" Then
                            mscstr = Mid(MainProgram.AbilityData, InStr(MainProgram.AbilityData, "BATIN#" + AbilityVIRID + "(") + 7 + Len(AbilityVIRID), tempvar2 - InStr(MainProgram.AbilityData, "BATIN#" + AbilityVIRID + "(") - 7 - Len(AbilityVIRID))
                            If mscstr = "1" Then
                                MainProgram.AbilityData_InsideBattle = True
                            Else
                                MainProgram.AbilityData_InsideBattle = False
                            End If
                            Exit For
                        End If
                    Next
                End If
                tempvar = InStr(MainProgram.AbilityData, "AFNUM#" + AbilityVIRID + "(")
                If tempvar > 0 Then
                    For tempvar2 = InStr(MainProgram.AbilityData, "AFNUM#" + AbilityVIRID + "(") To Len(MainProgram.AbilityData) Step 1
                        If Mid(MainProgram.AbilityData, tempvar2, 1) = ")" Then
                            mscstr = Mid(MainProgram.AbilityData, InStr(MainProgram.AbilityData, "AFNUM#" + AbilityVIRID + "(") + 7 + Len(AbilityVIRID), tempvar2 - InStr(MainProgram.AbilityData, "AFNUM#" + AbilityVIRID + "(") - 7 - Len(AbilityVIRID))
                            If mscstr = 1 Then
                                MainProgram.AbilityData_AffectNumber = 1
                            ElseIf mscstr = 2 Then
                                MainProgram.AbilityData_AffectNumber = 2
                            ElseIf mscstr = 3 Then
                                MainProgram.AbilityData_AffectNumber = 3
                            Else
                                MainProgram.AbilityData_AffectNumber = 4
                            End If
                            Exit For
                        End If
                    Next
                End If
                tempvar = InStr(MainProgram.AbilityData, "AFFE1#" + AbilityVIRID + "(")
                If tempvar > 0 Then
                    For tempvar2 = InStr(MainProgram.AbilityData, "AFFE1#" + AbilityVIRID + "(") To Len(MainProgram.AbilityData) Step 1
                        If Mid(MainProgram.AbilityData, tempvar2, 1) = ")" Then
                            mscstr = Mid(MainProgram.AbilityData, InStr(MainProgram.AbilityData, "AFFE1#" + AbilityVIRID + "(") + 7 + Len(AbilityVIRID), tempvar2 - InStr(MainProgram.AbilityData, "AFFE1#" + AbilityVIRID + "(") - 7 - Len(AbilityVIRID))
                            Dim AbilityType As String = ""
                            stepnum = 0
                            For tempvar3 = 1 To Len(mscstr) + 1 Step 1
                                If Mid(mscstr + ",", tempvar3, 1) = "," Then
                                    If stepnum = 0 Then
                                        If Mid(mscstr, 1, tempvar3 - 1) = "00" Then
                                            MainProgram.AbilityData_Affect1Type = "Damaging"
                                            AbilityType = "Damaging"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "01" Then
                                            MainProgram.AbilityData_Affect1Type = "Healing"
                                            AbilityType = "Healing"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "02" Then
                                            MainProgram.AbilityData_Affect1Type = "Blind"
                                            AbilityType = "Blind"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "03" Then
                                            MainProgram.AbilityData_Affect1Type = "Silence"
                                            AbilityType = "Silence"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "04" Then
                                            MainProgram.AbilityData_Affect1Type = "Poison"
                                            AbilityType = "Poison"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "05" Then
                                            MainProgram.AbilityData_Affect1Type = "Disease"
                                            AbilityType = "Disease"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "06" Then
                                            MainProgram.AbilityData_Affect1Type = "Speed"
                                            AbilityType = "Speed"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "07" Then
                                            MainProgram.AbilityData_Affect1Type = "Summon"
                                            AbilityType = "Summon"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "08" Then
                                            MainProgram.AbilityData_Affect1Type = "Stats Modifier"
                                            AbilityType = "Stats Modifier"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "09" Then
                                            MainProgram.AbilityData_Affect1Type = "Aura"
                                            AbilityType = "Aura"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "10" Then
                                            MainProgram.AbilityData_Affect1Type = "Fear"
                                            AbilityType = "Fear"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "11" Then
                                            MainProgram.AbilityData_Affect1Type = "Cripple"
                                            AbilityType = "Cripple"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "12" Then
                                            MainProgram.AbilityData_Affect1Type = "Stun"
                                            AbilityType = "Stun"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "13" Then
                                            MainProgram.AbilityData_Affect1Type = "Cure"
                                            AbilityType = "Cure"
                                        End If
                                        tempvar4 = tempvar3 + 1
                                        stepnum += 1
                                    ElseIf stepnum = 1 Then
                                        If AbilityType = "Damaging" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Bash"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Slash"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Pierce"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Fist"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "4" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Exotic"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "5" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Physical"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "6" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Fire"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "7" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Water"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "8" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Air"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "9" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Earth"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "10" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Spirit"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "11" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Sub-elemental Fire"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "12" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Sub-elemental Water"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "13" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Sub-elemental Air"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "14" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Sub-elemental Earth"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "15" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Sub-elementalSpirit"
                                            End If
0:                                      ElseIf AbilityType = "Healing" Then
                                            If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "%") Then
                                                If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "HP") Then
                                                    MainProgram.AbilityData_Affect1DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect1DamageP2 = ""
                                                    MainProgram.AbilityData_Affect1DamageP3 = ""
                                                    MainProgram.AbilityData_Affect1DamageP4 = ""
                                                    MainProgram.AbilityData_Affect1DamageP5 = ""
                                                ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "WP") Then
                                                    MainProgram.AbilityData_Affect1DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect1DamageP2 = ""
                                                    MainProgram.AbilityData_Affect1DamageP3 = "" 'change for expansion later
                                                    MainProgram.AbilityData_Affect1DamageP4 = ""
                                                    MainProgram.AbilityData_Affect1DamageP5 = ""
                                                Else
                                                    MainProgram.AbilityData_Affect1DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect1DamageP2 = ""
                                                    MainProgram.AbilityData_Affect1DamageP3 = ""
                                                    MainProgram.AbilityData_Affect1DamageP4 = ""
                                                    MainProgram.AbilityData_Affect1DamageP5 = ""
                                                End If
                                            ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "+") Then
                                                Dim tmp4 As Integer, tmpa As String = Mid(mscstr, tempvar4, tempvar3 - tempvar4), tmpstep As Integer = 0, tmp5 As Integer
                                                For tmp4 = 1 To Len(tmpa) Step 1
                                                    If Mid(tmpa, tmp4, 1) = "d" Then
                                                        MainProgram.AbilityData_Affect1DamageP1 = Mid(tmpa, 1, tmp4 - 1)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 1) = "+" Then
                                                        MainProgram.AbilityData_Affect1DamageP2 = Mid(tmpa, tmp5 - 1, tmp4 - tmp5 + 1)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 1) = "." Then
                                                        MainProgram.AbilityData_Affect1DamageP4 = Mid(tmpa, tmp5, tmp4 - tmp5)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 2) = "HP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect1DamageP5 = "HP"
                                                        Exit For
                                                    ElseIf Mid(tmpa, tmp4, 2) = "WP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect1DamageP5 = "WP"
                                                        Exit For
                                                    ElseIf Mid(tmpa, tmp4, 2) = "SP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect1DamageP5 = "SP"
                                                        Exit For
                                                    End If
                                                Next
                                            Else
                                                If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "HP") Then
                                                    MainProgram.AbilityData_Affect1DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect1DamageP2 = ""
                                                    MainProgram.AbilityData_Affect1DamageP3 = ""
                                                    MainProgram.AbilityData_Affect1DamageP4 = ""
                                                    MainProgram.AbilityData_Affect1DamageP5 = ""
                                                ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "WP") Then
                                                    MainProgram.AbilityData_Affect1DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect1DamageP2 = ""
                                                    MainProgram.AbilityData_Affect1DamageP3 = "" 'expand this later
                                                    MainProgram.AbilityData_Affect1DamageP4 = ""
                                                    MainProgram.AbilityData_Affect1DamageP5 = ""
                                                Else
                                                    MainProgram.AbilityData_Affect1DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect1DamageP2 = ""
                                                    MainProgram.AbilityData_Affect1DamageP3 = ""
                                                    MainProgram.AbilityData_Affect1DamageP4 = ""
                                                    MainProgram.AbilityData_Affect1DamageP5 = ""
                                                End If
                                            End If
                                        ElseIf AbilityType = "Blind" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Silence" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Poison" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Bash"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Slash"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Pierce"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Fist"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "4" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Exotic"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "5" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Physical"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "6" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Fire"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "7" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Water"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "8" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Air"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "9" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Earth"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "10" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Spirit"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "11" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Sub-elemental Fire"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "12" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Sub-elemental Water"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "13" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Sub-elemental Air"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "14" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Sub-elemental Earth"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "15" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Sub-elementalSpirit"
                                            End If
                                        ElseIf AbilityType = "Disease" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Bash"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Slash"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Pierce"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Fist"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "4" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Exotic"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "5" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Physical"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "6" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Fire"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "7" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Water"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "8" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Air"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "9" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Earth"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "10" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Spirit"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "11" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Sub-elemental Fire"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "12" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Sub-elemental Water"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "13" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Sub-elemental Air"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "14" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Sub-elemental Earth"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "15" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Sub-elementalSpirit"
                                            End If
                                        ElseIf AbilityType = "Speed" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Summon" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Bash"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Slash"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Pierce"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Fist"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "4" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Exotic"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "5" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Physical"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "6" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Fire"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "7" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Water"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "8" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Air"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "9" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Earth"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "10" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Spirit"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "11" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Sub-elemental Fire"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "12" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Sub-elemental Water"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "13" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Sub-elemental Air"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "14" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Sub-elemental Earth"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "15" Then
                                                MainProgram.AbilityData_Affect1DamageType = "Sub-elementalSpirit"
                                            End If
                                        ElseIf AbilityType = "Stats Modifier" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Aura" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Fear" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Cripple" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Stun" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Cure" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Sector"
                                            End If
                                        End If
                                        tempvar4 = tempvar3 + 1
                                        stepnum += 1
                                    ElseIf stepnum = 2 Then
                                        If AbilityType = "Damaging" Then
                                            If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "%") Then
                                                If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "HP") Then
                                                    MainProgram.AbilityData_Affect1DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect1DamageP2 = ""
                                                    MainProgram.AbilityData_Affect1DamageP3 = ""
                                                    MainProgram.AbilityData_Affect1DamageP4 = ""
                                                    MainProgram.AbilityData_Affect1DamageP5 = ""
                                                ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "WP") Then
                                                    MainProgram.AbilityData_Affect1DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect1DamageP2 = ""
                                                    MainProgram.AbilityData_Affect1DamageP3 = "" 'change for expansion later
                                                    MainProgram.AbilityData_Affect1DamageP4 = ""
                                                    MainProgram.AbilityData_Affect1DamageP5 = ""
                                                Else
                                                    MainProgram.AbilityData_Affect1DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect1DamageP2 = ""
                                                    MainProgram.AbilityData_Affect1DamageP3 = ""
                                                    MainProgram.AbilityData_Affect1DamageP4 = ""
                                                    MainProgram.AbilityData_Affect1DamageP5 = ""
                                                End If
                                            ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "+") Then
                                                Dim tmp4 As Integer, tmpa As String = Mid(mscstr, tempvar4, tempvar3 - tempvar4), tmpstep As Integer = 0, tmp5 As Integer
                                                For tmp4 = 1 To Len(tmpa) Step 1
                                                    If Mid(tmpa, tmp4, 1) = "d" Then
                                                        MainProgram.AbilityData_Affect1DamageP1 = Mid(tmpa, 1, tmp4 - 1)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 1) = "+" Then
                                                        MainProgram.AbilityData_Affect1DamageP2 = Mid(tmpa, tmp5 - 1, tmp4 - tmp5 + 1)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 1) = "." Then
                                                        MainProgram.AbilityData_Affect1DamageP4 = Mid(tmpa, tmp5, tmp4 - tmp5)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 2) = "HP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect1DamageP5 = "HP"
                                                        Exit For
                                                    ElseIf Mid(tmpa, tmp4, 2) = "WP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect1DamageP5 = "WP"
                                                        Exit For
                                                    ElseIf Mid(tmpa, tmp4, 2) = "SP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect1DamageP5 = "SP"
                                                        Exit For
                                                    End If
                                                Next
                                            Else
                                                If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "HP") Then
                                                    MainProgram.AbilityData_Affect1DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect1DamageP2 = ""
                                                    MainProgram.AbilityData_Affect1DamageP3 = ""
                                                    MainProgram.AbilityData_Affect1DamageP4 = ""
                                                    MainProgram.AbilityData_Affect1DamageP5 = ""
                                                ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "WP") Then
                                                    MainProgram.AbilityData_Affect1DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect1DamageP2 = ""
                                                    MainProgram.AbilityData_Affect1DamageP3 = "" 'expand this later
                                                    MainProgram.AbilityData_Affect1DamageP4 = ""
                                                    MainProgram.AbilityData_Affect1DamageP5 = ""
                                                Else
                                                    MainProgram.AbilityData_Affect1DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect1DamageP2 = ""
                                                    MainProgram.AbilityData_Affect1DamageP3 = ""
                                                    MainProgram.AbilityData_Affect1DamageP4 = ""
                                                    MainProgram.AbilityData_Affect1DamageP5 = ""
                                                End If
                                            End If
                                        ElseIf AbilityType = "Healing" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect1HealingType = "Living"
                                            Else
                                                MainProgram.AbilityData_Affect1HealingType = "Dead"
                                            End If
                                        ElseIf AbilityType = "Blind" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect1TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect1TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Silence" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect1TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect1TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Poison" Then
                                            If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "%") Then
                                                If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "HP") Then
                                                    MainProgram.AbilityData_Affect1DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect1DamageP2 = ""
                                                    MainProgram.AbilityData_Affect1DamageP3 = ""
                                                    MainProgram.AbilityData_Affect1DamageP4 = ""
                                                    MainProgram.AbilityData_Affect1DamageP5 = ""
                                                ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "WP") Then
                                                    MainProgram.AbilityData_Affect1DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect1DamageP2 = ""
                                                    MainProgram.AbilityData_Affect1DamageP3 = "" 'change for expansion later
                                                    MainProgram.AbilityData_Affect1DamageP4 = ""
                                                    MainProgram.AbilityData_Affect1DamageP5 = ""
                                                Else
                                                    MainProgram.AbilityData_Affect1DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect1DamageP2 = ""
                                                    MainProgram.AbilityData_Affect1DamageP3 = ""
                                                    MainProgram.AbilityData_Affect1DamageP4 = ""
                                                    MainProgram.AbilityData_Affect1DamageP5 = ""
                                                End If
                                            ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "+") Then
                                                Dim tmp4 As Integer, tmpa As String = Mid(mscstr, tempvar4, tempvar3 - tempvar4), tmpstep As Integer = 0, tmp5 As Integer
                                                For tmp4 = 1 To Len(tmpa) Step 1
                                                    If Mid(tmpa, tmp4, 1) = "d" Then
                                                        MainProgram.AbilityData_Affect1DamageP1 = Mid(tmpa, 1, tmp4 - 1)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 1) = "+" Then
                                                        MainProgram.AbilityData_Affect1DamageP2 = Mid(tmpa, tmp5 - 1, tmp4 - tmp5 + 1)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 1) = "." Then
                                                        MainProgram.AbilityData_Affect1DamageP4 = Mid(tmpa, tmp5, tmp4 - tmp5)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 2) = "HP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect1DamageP5 = "HP"
                                                        Exit For
                                                    ElseIf Mid(tmpa, tmp4, 2) = "WP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect1DamageP5 = "WP"
                                                        Exit For
                                                    ElseIf Mid(tmpa, tmp4, 2) = "SP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect1DamageP5 = "SP"
                                                        Exit For
                                                    End If
                                                Next
                                            Else
                                                If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "HP") Then
                                                    MainProgram.AbilityData_Affect1DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect1DamageP2 = ""
                                                    MainProgram.AbilityData_Affect1DamageP3 = ""
                                                    MainProgram.AbilityData_Affect1DamageP4 = ""
                                                    MainProgram.AbilityData_Affect1DamageP5 = ""
                                                ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "WP") Then
                                                    MainProgram.AbilityData_Affect1DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect1DamageP2 = ""
                                                    MainProgram.AbilityData_Affect1DamageP3 = "" 'expand this later
                                                    MainProgram.AbilityData_Affect1DamageP4 = ""
                                                    MainProgram.AbilityData_Affect1DamageP5 = ""
                                                Else
                                                    MainProgram.AbilityData_Affect1DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect1DamageP2 = ""
                                                    MainProgram.AbilityData_Affect1DamageP3 = ""
                                                    MainProgram.AbilityData_Affect1DamageP4 = ""
                                                    MainProgram.AbilityData_Affect1DamageP5 = ""
                                                End If
                                            End If
                                        ElseIf AbilityType = "Disease" Then
                                            If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "%") Then
                                                If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "HP") Then
                                                    MainProgram.AbilityData_Affect1DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect1DamageP2 = ""
                                                    MainProgram.AbilityData_Affect1DamageP3 = ""
                                                    MainProgram.AbilityData_Affect1DamageP4 = ""
                                                    MainProgram.AbilityData_Affect1DamageP5 = ""
                                                ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "WP") Then
                                                    MainProgram.AbilityData_Affect1DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect1DamageP2 = ""
                                                    MainProgram.AbilityData_Affect1DamageP3 = "" 'change for expansion later
                                                    MainProgram.AbilityData_Affect1DamageP4 = ""
                                                    MainProgram.AbilityData_Affect1DamageP5 = ""
                                                Else
                                                    MainProgram.AbilityData_Affect1DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect1DamageP2 = ""
                                                    MainProgram.AbilityData_Affect1DamageP3 = ""
                                                    MainProgram.AbilityData_Affect1DamageP4 = ""
                                                    MainProgram.AbilityData_Affect1DamageP5 = ""
                                                End If
                                            ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "+") Then
                                                Dim tmp4 As Integer, tmpa As String = Mid(mscstr, tempvar4, tempvar3 - tempvar4), tmpstep As Integer = 0, tmp5 As Integer
                                                For tmp4 = 1 To Len(tmpa) Step 1
                                                    If Mid(tmpa, tmp4, 1) = "d" Then
                                                        MainProgram.AbilityData_Affect1DamageP1 = Mid(tmpa, 1, tmp4 - 1)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 1) = "+" Then
                                                        MainProgram.AbilityData_Affect1DamageP2 = Mid(tmpa, tmp5 - 1, tmp4 - tmp5 + 1)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 1) = "." Then
                                                        MainProgram.AbilityData_Affect1DamageP4 = Mid(tmpa, tmp5, tmp4 - tmp5)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 2) = "HP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect1DamageP5 = "HP"
                                                        Exit For
                                                    ElseIf Mid(tmpa, tmp4, 2) = "WP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect1DamageP5 = "WP"
                                                        Exit For
                                                    ElseIf Mid(tmpa, tmp4, 2) = "SP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect1DamageP5 = "SP"
                                                        Exit For
                                                    End If
                                                Next
                                            Else
                                                If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "HP") Then
                                                    MainProgram.AbilityData_Affect1DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect1DamageP2 = ""
                                                    MainProgram.AbilityData_Affect1DamageP3 = ""
                                                    MainProgram.AbilityData_Affect1DamageP4 = ""
                                                    MainProgram.AbilityData_Affect1DamageP5 = ""
                                                ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "WP") Then
                                                    MainProgram.AbilityData_Affect1DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect1DamageP2 = ""
                                                    MainProgram.AbilityData_Affect1DamageP3 = "" 'expand this later
                                                    MainProgram.AbilityData_Affect1DamageP4 = ""
                                                    MainProgram.AbilityData_Affect1DamageP5 = ""
                                                Else
                                                    MainProgram.AbilityData_Affect1DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect1DamageP2 = ""
                                                    MainProgram.AbilityData_Affect1DamageP3 = ""
                                                    MainProgram.AbilityData_Affect1DamageP4 = ""
                                                    MainProgram.AbilityData_Affect1DamageP5 = ""
                                                End If
                                            End If
                                        ElseIf AbilityType = "Speed" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect1TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect1TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Summon" Then
                                            If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "%") Then
                                                If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "HP") Then
                                                    MainProgram.AbilityData_Affect1DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect1DamageP2 = ""
                                                    MainProgram.AbilityData_Affect1DamageP3 = ""
                                                    MainProgram.AbilityData_Affect1DamageP4 = ""
                                                    MainProgram.AbilityData_Affect1DamageP5 = ""
                                                ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "WP") Then
                                                    MainProgram.AbilityData_Affect1DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect1DamageP2 = ""
                                                    MainProgram.AbilityData_Affect1DamageP3 = "" 'change for expansion later
                                                    MainProgram.AbilityData_Affect1DamageP4 = ""
                                                    MainProgram.AbilityData_Affect1DamageP5 = ""
                                                Else
                                                    MainProgram.AbilityData_Affect1DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect1DamageP2 = ""
                                                    MainProgram.AbilityData_Affect1DamageP3 = ""
                                                    MainProgram.AbilityData_Affect1DamageP4 = ""
                                                    MainProgram.AbilityData_Affect1DamageP5 = ""
                                                End If
                                            ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "+") Then
                                                Dim tmp4 As Integer, tmpa As String = Mid(mscstr, tempvar4, tempvar3 - tempvar4), tmpstep As Integer = 0, tmp5 As Integer
                                                For tmp4 = 1 To Len(tmpa) Step 1
                                                    If Mid(tmpa, tmp4, 1) = "d" Then
                                                        MainProgram.AbilityData_Affect1DamageP1 = Mid(tmpa, 1, tmp4 - 1)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 1) = "+" Then
                                                        MainProgram.AbilityData_Affect1DamageP2 = Mid(tmpa, tmp5 - 1, tmp4 - tmp5 + 1)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 1) = "." Then
                                                        MainProgram.AbilityData_Affect1DamageP4 = Mid(tmpa, tmp5, tmp4 - tmp5)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 2) = "HP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect1DamageP5 = "HP"
                                                        Exit For
                                                    ElseIf Mid(tmpa, tmp4, 2) = "WP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect1DamageP5 = "WP"
                                                        Exit For
                                                    ElseIf Mid(tmpa, tmp4, 2) = "SP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect1DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect1DamageP5 = "SP"
                                                        Exit For
                                                    End If
                                                Next
                                            Else
                                                If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "HP") Then
                                                    MainProgram.AbilityData_Affect1DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect1DamageP2 = ""
                                                    MainProgram.AbilityData_Affect1DamageP3 = ""
                                                    MainProgram.AbilityData_Affect1DamageP4 = ""
                                                    MainProgram.AbilityData_Affect1DamageP5 = ""
                                                ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "WP") Then
                                                    MainProgram.AbilityData_Affect1DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect1DamageP2 = ""
                                                    MainProgram.AbilityData_Affect1DamageP3 = "" 'expand this later
                                                    MainProgram.AbilityData_Affect1DamageP4 = ""
                                                    MainProgram.AbilityData_Affect1DamageP5 = ""
                                                Else
                                                    MainProgram.AbilityData_Affect1DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect1DamageP2 = ""
                                                    MainProgram.AbilityData_Affect1DamageP3 = ""
                                                    MainProgram.AbilityData_Affect1DamageP4 = ""
                                                    MainProgram.AbilityData_Affect1DamageP5 = ""
                                                End If
                                            End If
                                        ElseIf AbilityType = "Stats Modifier" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect1ModifierType = "Strength"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect1ModifierType = "Dexterity"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect1ModifierType = "Intelligence"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect1ModifierType = "Wisdom"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "4" Then
                                                MainProgram.AbilityData_Affect1ModifierType = "Charisma"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "5" Then
                                                MainProgram.AbilityData_Affect1ModifierType = "Luck"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "6" Then
                                                MainProgram.AbilityData_Affect1ModifierType = "Bash Armor Class"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "7" Then
                                                MainProgram.AbilityData_Affect1ModifierType = "Slash Armor Class"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "8" Then
                                                MainProgram.AbilityData_Affect1ModifierType = "Pierce Armor Class"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "9" Then
                                                MainProgram.AbilityData_Affect1ModifierType = "Fist Armor Class"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "10" Then
                                                MainProgram.AbilityData_Affect1ModifierType = "Exotic Armor Class"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "11" Then
                                                MainProgram.AbilityData_Affect1ModifierType = "Natural Armor Class"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "12" Then
                                                MainProgram.AbilityData_Affect1ModifierType = "Fire Resistance"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "13" Then
                                                MainProgram.AbilityData_Affect1ModifierType = "Water Resistance"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "14" Then
                                                MainProgram.AbilityData_Affect1ModifierType = "Air Resistance"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "15" Then
                                                MainProgram.AbilityData_Affect1ModifierType = "Earth Resistance"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "16" Then
                                                MainProgram.AbilityData_Affect1ModifierType = "Spirit Resistance"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "17" Then
                                                MainProgram.AbilityData_Affect1ModifierType = "Sub-elemental Fire Resistance"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "18" Then
                                                MainProgram.AbilityData_Affect1ModifierType = "Sub-elemental Water Resistance"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "19" Then
                                                MainProgram.AbilityData_Affect1ModifierType = "Sub-elemental Air Resistance"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "20" Then
                                                MainProgram.AbilityData_Affect1ModifierType = "Sub-elemental Earth Resistance"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "21" Then
                                                MainProgram.AbilityData_Affect1ModifierType = "Sub-elemental Spirit Resistance"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "22" Then
                                                MainProgram.AbilityData_Affect1ModifierType = "Fire Amplitude"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "23" Then
                                                MainProgram.AbilityData_Affect1ModifierType = "Water Amplitude"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "24" Then
                                                MainProgram.AbilityData_Affect1ModifierType = "Air Amplitude"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "25" Then
                                                MainProgram.AbilityData_Affect1ModifierType = "Earth Amplitude"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "26" Then
                                                MainProgram.AbilityData_Affect1ModifierType = "Spirit Amplitude"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "27" Then
                                                MainProgram.AbilityData_Affect1ModifierType = "Sub-elemental Fire Amplitude"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "28" Then
                                                MainProgram.AbilityData_Affect1ModifierType = "Sub-elemental Water Amplitude"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "29" Then
                                                MainProgram.AbilityData_Affect1ModifierType = "Sub-elemental Air Amplitude"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "30" Then
                                                MainProgram.AbilityData_Affect1ModifierType = "Sub-elemental Earth Amplitude"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "31" Then
                                                MainProgram.AbilityData_Affect1ModifierType = "Sub-elemental Spirit Amplitude"
                                            End If
                                        ElseIf AbilityType = "Aura" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect1TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect1TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Fear" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect1TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect1TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Cripple" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect1TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect1TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Stun" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect1TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect1TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Cure" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect1TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect1TimedType = "Not Instant"
                                            End If
                                        End If
                                        tempvar4 = tempvar3 + 1
                                        stepnum += 1
                                    ElseIf stepnum = 3 Then
                                        If AbilityType = "Damaging" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Healing" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Blind" Then
                                            MainProgram.AbilityData_Affect1TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Silence" Then
                                            MainProgram.AbilityData_Affect1TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Poison" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Disease" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect1TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Speed" Then
                                            MainProgram.AbilityData_Affect1TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Summon" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect1TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect1TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Stats Modifier" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect1TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect1TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Aura" Then
                                            MainProgram.AbilityData_Affect1TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Fear" Then
                                            MainProgram.AbilityData_Affect1TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Cripple" Then
                                            MainProgram.AbilityData_Affect1TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Stun" Then
                                            MainProgram.AbilityData_Affect1TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Cure" Then
                                            MainProgram.AbilityData_Affect1TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        End If
                                        tempvar4 = tempvar3 + 1
                                        stepnum += 1
                                    ElseIf stepnum = 4 Then
                                        If AbilityType = "Damaging" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect1TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect1TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Healing" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect1TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect1TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Poison" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect1TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect1TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Disease" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect1TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect1TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Summon" Then
                                            MainProgram.AbilityData_Affect1TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Stats Modifier" Then
                                            MainProgram.AbilityData_Affect1TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        End If
                                        tempvar4 = tempvar3 + 1
                                        stepnum += 1
                                    ElseIf stepnum = 5 Then
                                        If AbilityType = "Damaging" Then
                                            MainProgram.AbilityData_Affect1TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Healing" Then
                                            MainProgram.AbilityData_Affect1TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Poison" Then
                                            MainProgram.AbilityData_Affect1TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Disease" Then
                                            MainProgram.AbilityData_Affect1TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Summon" Then
                                            Dim tmp4 As Integer, tmpa As String = Mid(mscstr, tempvar4, tempvar3 - tempvar4), tmpstep As Integer = 0, tmp5 As Integer
                                            For tmp4 = 1 To Len(tmpa) + 1 Step 1
                                                If Mid(tmpa + ".", tmp4, 1) = "." And tmpstep = 0 Then
                                                    MainProgram.AbilityData_Affect1SummonHP = Mid(tmpa, 1, tmp4 - 1)
                                                    tmpstep += 1
                                                    tmp5 = tmp4 + 1
                                                ElseIf Mid(tmpa + ".", tmp4, 1) = "." And tmpstep = 1 Then
                                                    MainProgram.AbilityData_Affect1SummonWP = Mid(tmpa, tmp5, tmp4 - tmp5)
                                                    tmpstep += 1
                                                    tmp5 = tmp4 + 1
                                                ElseIf Mid(tmpa + ".", tmp4, 1) = "." And tmpstep = 2 Then
                                                    MainProgram.AbilityData_Affect1SummonSP = Mid(tmpa, tmp5, tmp4 - tmp5)
                                                    tmpstep += 1
                                                    tmp5 = tmp4 + 1
                                                    Exit For
                                                End If
                                            Next
                                        End If
                                        tempvar4 = tempvar3 + 1
                                        stepnum += 1
                                    End If
                                End If
                            Next
                            Exit For
                        End If
                    Next
                End If
                tempvar = InStr(MainProgram.AbilityData, "AFFE2#" + AbilityVIRID + "(")
                If tempvar > 0 Then
                    For tempvar2 = InStr(MainProgram.AbilityData, "AFFE2#" + AbilityVIRID + "(") To Len(MainProgram.AbilityData) Step 1
                        If Mid(MainProgram.AbilityData, tempvar2, 1) = ")" Then
                            mscstr = Mid(MainProgram.AbilityData, InStr(MainProgram.AbilityData, "AFFE2#" + AbilityVIRID + "(") + 7 + Len(AbilityVIRID), tempvar2 - InStr(MainProgram.AbilityData, "AFFE2#" + AbilityVIRID + "(") - 7 - Len(AbilityVIRID))
                            Dim AbilityType As String = ""
                            stepnum = 0
                            For tempvar3 = 1 To Len(mscstr) + 1 Step 1
                                If Mid(mscstr + ",", tempvar3, 1) = "," Then
                                    If stepnum = 0 Then
                                        If Mid(mscstr, 1, tempvar3 - 1) = "00" Then
                                            MainProgram.AbilityData_Affect2Type = "Damaging"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "01" Then
                                            MainProgram.AbilityData_Affect2Type = "Healing"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "02" Then
                                            MainProgram.AbilityData_Affect2Type = "Blind"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "03" Then
                                            MainProgram.AbilityData_Affect2Type = "Silence"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "04" Then
                                            MainProgram.AbilityData_Affect2Type = "Poison"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "05" Then
                                            MainProgram.AbilityData_Affect2Type = "Disease"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "06" Then
                                            MainProgram.AbilityData_Affect2Type = "Speed"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "07" Then
                                            MainProgram.AbilityData_Affect2Type = "Summon"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "08" Then
                                            MainProgram.AbilityData_Affect2Type = "Stats Modifier"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "09" Then
                                            MainProgram.AbilityData_Affect2Type = "Aura"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "10" Then
                                            MainProgram.AbilityData_Affect2Type = "Fear"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "11" Then
                                            MainProgram.AbilityData_Affect2Type = "Cripple"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "12" Then
                                            MainProgram.AbilityData_Affect2Type = "Stun"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "13" Then
                                            MainProgram.AbilityData_Affect2Type = "Cure"
                                        End If
                                        tempvar4 = tempvar3 + 1
                                        stepnum += 1
                                    ElseIf stepnum = 1 Then
                                        If AbilityType = "Damaging" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Bash"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Slash"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Pierce"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Fist"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "4" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Exotic"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "5" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Physical"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "6" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Fire"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "7" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Water"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "8" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Air"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "9" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Earth"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "10" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Spirit"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "11" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Sub-elemental Fire"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "12" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Sub-elemental Water"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "13" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Sub-elemental Air"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "14" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Sub-elemental Earth"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "15" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Sub-elementalSpirit"
                                            End If
                                        ElseIf AbilityType = "Healing" Then
                                            If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "%") Then
                                                If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "HP") Then
                                                    MainProgram.AbilityData_Affect2DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect2DamageP2 = ""
                                                    MainProgram.AbilityData_Affect2DamageP3 = ""
                                                    MainProgram.AbilityData_Affect2DamageP4 = ""
                                                    MainProgram.AbilityData_Affect2DamageP5 = ""
                                                ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "WP") Then
                                                    MainProgram.AbilityData_Affect2DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect2DamageP2 = ""
                                                    MainProgram.AbilityData_Affect2DamageP3 = "" 'change for expansion later
                                                    MainProgram.AbilityData_Affect2DamageP4 = ""
                                                    MainProgram.AbilityData_Affect2DamageP5 = ""
                                                Else
                                                    MainProgram.AbilityData_Affect2DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect2DamageP2 = ""
                                                    MainProgram.AbilityData_Affect2DamageP3 = ""
                                                    MainProgram.AbilityData_Affect2DamageP4 = ""
                                                    MainProgram.AbilityData_Affect2DamageP5 = ""
                                                End If
                                            ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "+") Then
                                                Dim tmp4 As Integer, tmpa As String = Mid(mscstr, tempvar4, tempvar3 - tempvar4), tmpstep As Integer = 0, tmp5 As Integer
                                                For tmp4 = 1 To Len(tmpa) Step 1
                                                    If Mid(tmpa, tmp4, 1) = "d" Then
                                                        MainProgram.AbilityData_Affect2DamageP1 = Mid(tmpa, 1, tmp4 - 1)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 1) = "+" Then
                                                        MainProgram.AbilityData_Affect2DamageP2 = Mid(tmpa, tmp5 - 1, tmp4 - tmp5 + 1)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 1) = "." Then
                                                        MainProgram.AbilityData_Affect2DamageP4 = Mid(tmpa, tmp5, tmp4 - tmp5)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 2) = "HP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect2DamageP5 = "HP"
                                                        Exit For
                                                    ElseIf Mid(tmpa, tmp4, 2) = "WP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect2DamageP5 = "WP"
                                                        Exit For
                                                    ElseIf Mid(tmpa, tmp4, 2) = "SP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect2DamageP5 = "SP"
                                                        Exit For
                                                    End If
                                                Next
                                            Else
                                                If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "HP") Then
                                                    MainProgram.AbilityData_Affect2DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect2DamageP2 = ""
                                                    MainProgram.AbilityData_Affect2DamageP3 = ""
                                                    MainProgram.AbilityData_Affect2DamageP4 = ""
                                                    MainProgram.AbilityData_Affect2DamageP5 = ""
                                                ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "WP") Then
                                                    MainProgram.AbilityData_Affect2DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect2DamageP2 = ""
                                                    MainProgram.AbilityData_Affect2DamageP3 = "" 'expand this later
                                                    MainProgram.AbilityData_Affect2DamageP4 = ""
                                                    MainProgram.AbilityData_Affect2DamageP5 = ""
                                                Else
                                                    MainProgram.AbilityData_Affect2DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect2DamageP2 = ""
                                                    MainProgram.AbilityData_Affect2DamageP3 = ""
                                                    MainProgram.AbilityData_Affect2DamageP4 = ""
                                                    MainProgram.AbilityData_Affect2DamageP5 = ""
                                                End If
                                            End If
                                        ElseIf AbilityType = "Blind" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Silence" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Poison" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Bash"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Slash"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Pierce"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Fist"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "4" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Exotic"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "5" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Physical"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "6" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Fire"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "7" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Water"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "8" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Air"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "9" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Earth"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "10" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Spirit"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "11" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Sub-elemental Fire"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "12" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Sub-elemental Water"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "13" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Sub-elemental Air"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "14" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Sub-elemental Earth"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "15" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Sub-elementalSpirit"
                                            End If
                                        ElseIf AbilityType = "Disease" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Bash"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Slash"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Pierce"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Fist"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "4" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Exotic"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "5" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Physical"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "6" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Fire"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "7" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Water"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "8" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Air"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "9" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Earth"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "10" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Spirit"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "11" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Sub-elemental Fire"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "12" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Sub-elemental Water"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "13" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Sub-elemental Air"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "14" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Sub-elemental Earth"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "15" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Sub-elementalSpirit"
                                            End If
                                        ElseIf AbilityType = "Speed" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Summon" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Bash"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Slash"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Pierce"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Fist"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "4" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Exotic"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "5" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Physical"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "6" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Fire"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "7" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Water"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "8" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Air"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "9" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Earth"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "10" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Spirit"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "11" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Sub-elemental Fire"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "12" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Sub-elemental Water"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "13" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Sub-elemental Air"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "14" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Sub-elemental Earth"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "15" Then
                                                MainProgram.AbilityData_Affect2DamageType = "Sub-elementalSpirit"
                                            End If
                                        ElseIf AbilityType = "Stats Modifier" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Aura" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Fear" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Cripple" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Stun" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Cure" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Sector"
                                            End If
                                        End If
                                        tempvar4 = tempvar3 + 1
                                        stepnum += 1
                                    ElseIf stepnum = 2 Then
                                        If AbilityType = "Damaging" Then
                                            If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "%") Then
                                                If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "HP") Then
                                                    MainProgram.AbilityData_Affect2DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect2DamageP2 = ""
                                                    MainProgram.AbilityData_Affect2DamageP3 = ""
                                                    MainProgram.AbilityData_Affect2DamageP4 = ""
                                                    MainProgram.AbilityData_Affect2DamageP5 = ""
                                                ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "WP") Then
                                                    MainProgram.AbilityData_Affect2DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect2DamageP2 = ""
                                                    MainProgram.AbilityData_Affect2DamageP3 = "" 'change for expansion later
                                                    MainProgram.AbilityData_Affect2DamageP4 = ""
                                                    MainProgram.AbilityData_Affect2DamageP5 = ""
                                                Else
                                                    MainProgram.AbilityData_Affect2DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect2DamageP2 = ""
                                                    MainProgram.AbilityData_Affect2DamageP3 = ""
                                                    MainProgram.AbilityData_Affect2DamageP4 = ""
                                                    MainProgram.AbilityData_Affect2DamageP5 = ""
                                                End If
                                            ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "+") Then
                                                Dim tmp4 As Integer, tmpa As String = Mid(mscstr, tempvar4, tempvar3 - tempvar4), tmpstep As Integer = 0, tmp5 As Integer
                                                For tmp4 = 1 To Len(tmpa) Step 1
                                                    If Mid(tmpa, tmp4, 1) = "d" Then
                                                        MainProgram.AbilityData_Affect2DamageP1 = Mid(tmpa, 1, tmp4 - 1)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 1) = "+" Then
                                                        MainProgram.AbilityData_Affect2DamageP2 = Mid(tmpa, tmp5 - 1, tmp4 - tmp5 + 1)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 1) = "." Then
                                                        MainProgram.AbilityData_Affect2DamageP4 = Mid(tmpa, tmp5, tmp4 - tmp5)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 2) = "HP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect2DamageP5 = "HP"
                                                        Exit For
                                                    ElseIf Mid(tmpa, tmp4, 2) = "WP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect2DamageP5 = "WP"
                                                        Exit For
                                                    ElseIf Mid(tmpa, tmp4, 2) = "SP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect2DamageP5 = "SP"
                                                        Exit For
                                                    End If
                                                Next
                                            Else
                                                If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "HP") Then
                                                    MainProgram.AbilityData_Affect2DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect2DamageP2 = ""
                                                    MainProgram.AbilityData_Affect2DamageP3 = ""
                                                    MainProgram.AbilityData_Affect2DamageP4 = ""
                                                    MainProgram.AbilityData_Affect2DamageP5 = ""
                                                ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "WP") Then
                                                    MainProgram.AbilityData_Affect2DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect2DamageP2 = ""
                                                    MainProgram.AbilityData_Affect2DamageP3 = "" 'expand this later
                                                    MainProgram.AbilityData_Affect2DamageP4 = ""
                                                    MainProgram.AbilityData_Affect2DamageP5 = ""
                                                Else
                                                    MainProgram.AbilityData_Affect2DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect2DamageP2 = ""
                                                    MainProgram.AbilityData_Affect2DamageP3 = ""
                                                    MainProgram.AbilityData_Affect2DamageP4 = ""
                                                    MainProgram.AbilityData_Affect2DamageP5 = ""
                                                End If
                                            End If
                                        ElseIf AbilityType = "Healing" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect2HealingType = "Living"
                                            Else
                                                MainProgram.AbilityData_Affect2HealingType = "Dead"
                                            End If
                                        ElseIf AbilityType = "Blind" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect2TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect2TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Silence" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect2TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect2TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Poison" Then
                                            If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "%") Then
                                                If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "HP") Then
                                                    MainProgram.AbilityData_Affect2DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect2DamageP2 = ""
                                                    MainProgram.AbilityData_Affect2DamageP3 = ""
                                                    MainProgram.AbilityData_Affect2DamageP4 = ""
                                                    MainProgram.AbilityData_Affect2DamageP5 = ""
                                                ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "WP") Then
                                                    MainProgram.AbilityData_Affect2DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect2DamageP2 = ""
                                                    MainProgram.AbilityData_Affect2DamageP3 = "" 'change for expansion later
                                                    MainProgram.AbilityData_Affect2DamageP4 = ""
                                                    MainProgram.AbilityData_Affect2DamageP5 = ""
                                                Else
                                                    MainProgram.AbilityData_Affect2DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect2DamageP2 = ""
                                                    MainProgram.AbilityData_Affect2DamageP3 = ""
                                                    MainProgram.AbilityData_Affect2DamageP4 = ""
                                                    MainProgram.AbilityData_Affect2DamageP5 = ""
                                                End If
                                            ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "+") Then
                                                Dim tmp4 As Integer, tmpa As String = Mid(mscstr, tempvar4, tempvar3 - tempvar4), tmpstep As Integer = 0, tmp5 As Integer
                                                For tmp4 = 1 To Len(tmpa) Step 1
                                                    If Mid(tmpa, tmp4, 1) = "d" Then
                                                        MainProgram.AbilityData_Affect2DamageP1 = Mid(tmpa, 1, tmp4 - 1)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 1) = "+" Then
                                                        MainProgram.AbilityData_Affect2DamageP2 = Mid(tmpa, tmp5 - 1, tmp4 - tmp5 + 1)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 1) = "." Then
                                                        MainProgram.AbilityData_Affect2DamageP4 = Mid(tmpa, tmp5, tmp4 - tmp5)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 2) = "HP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect2DamageP5 = "HP"
                                                        Exit For
                                                    ElseIf Mid(tmpa, tmp4, 2) = "WP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect2DamageP5 = "WP"
                                                        Exit For
                                                    ElseIf Mid(tmpa, tmp4, 2) = "SP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect2DamageP5 = "SP"
                                                        Exit For
                                                    End If
                                                Next
                                            Else
                                                If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "HP") Then
                                                    MainProgram.AbilityData_Affect2DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect2DamageP2 = ""
                                                    MainProgram.AbilityData_Affect2DamageP3 = ""
                                                    MainProgram.AbilityData_Affect2DamageP4 = ""
                                                    MainProgram.AbilityData_Affect2DamageP5 = ""
                                                ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "WP") Then
                                                    MainProgram.AbilityData_Affect2DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect2DamageP2 = ""
                                                    MainProgram.AbilityData_Affect2DamageP3 = "" 'expand this later
                                                    MainProgram.AbilityData_Affect2DamageP4 = ""
                                                    MainProgram.AbilityData_Affect2DamageP5 = ""
                                                Else
                                                    MainProgram.AbilityData_Affect2DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect2DamageP2 = ""
                                                    MainProgram.AbilityData_Affect2DamageP3 = ""
                                                    MainProgram.AbilityData_Affect2DamageP4 = ""
                                                    MainProgram.AbilityData_Affect2DamageP5 = ""
                                                End If
                                            End If
                                        ElseIf AbilityType = "Disease" Then
                                            If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "%") Then
                                                If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "HP") Then
                                                    MainProgram.AbilityData_Affect2DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect2DamageP2 = ""
                                                    MainProgram.AbilityData_Affect2DamageP3 = ""
                                                    MainProgram.AbilityData_Affect2DamageP4 = ""
                                                    MainProgram.AbilityData_Affect2DamageP5 = ""
                                                ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "WP") Then
                                                    MainProgram.AbilityData_Affect2DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect2DamageP2 = ""
                                                    MainProgram.AbilityData_Affect2DamageP3 = "" 'change for expansion later
                                                    MainProgram.AbilityData_Affect2DamageP4 = ""
                                                    MainProgram.AbilityData_Affect2DamageP5 = ""
                                                Else
                                                    MainProgram.AbilityData_Affect2DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect2DamageP2 = ""
                                                    MainProgram.AbilityData_Affect2DamageP3 = ""
                                                    MainProgram.AbilityData_Affect2DamageP4 = ""
                                                    MainProgram.AbilityData_Affect2DamageP5 = ""
                                                End If
                                            ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "+") Then
                                                Dim tmp4 As Integer, tmpa As String = Mid(mscstr, tempvar4, tempvar3 - tempvar4), tmpstep As Integer = 0, tmp5 As Integer
                                                For tmp4 = 1 To Len(tmpa) Step 1
                                                    If Mid(tmpa, tmp4, 1) = "d" Then
                                                        MainProgram.AbilityData_Affect2DamageP1 = Mid(tmpa, 1, tmp4 - 1)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 1) = "+" Then
                                                        MainProgram.AbilityData_Affect2DamageP2 = Mid(tmpa, tmp5 - 1, tmp4 - tmp5 + 1)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 1) = "." Then
                                                        MainProgram.AbilityData_Affect2DamageP4 = Mid(tmpa, tmp5, tmp4 - tmp5)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 2) = "HP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect2DamageP5 = "HP"
                                                        Exit For
                                                    ElseIf Mid(tmpa, tmp4, 2) = "WP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect2DamageP5 = "WP"
                                                        Exit For
                                                    ElseIf Mid(tmpa, tmp4, 2) = "SP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect2DamageP5 = "SP"
                                                        Exit For
                                                    End If
                                                Next
                                            Else
                                                If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "HP") Then
                                                    MainProgram.AbilityData_Affect2DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect2DamageP2 = ""
                                                    MainProgram.AbilityData_Affect2DamageP3 = ""
                                                    MainProgram.AbilityData_Affect2DamageP4 = ""
                                                    MainProgram.AbilityData_Affect2DamageP5 = ""
                                                ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "WP") Then
                                                    MainProgram.AbilityData_Affect2DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect2DamageP2 = ""
                                                    MainProgram.AbilityData_Affect2DamageP3 = "" 'expand this later
                                                    MainProgram.AbilityData_Affect2DamageP4 = ""
                                                    MainProgram.AbilityData_Affect2DamageP5 = ""
                                                Else
                                                    MainProgram.AbilityData_Affect2DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect2DamageP2 = ""
                                                    MainProgram.AbilityData_Affect2DamageP3 = ""
                                                    MainProgram.AbilityData_Affect2DamageP4 = ""
                                                    MainProgram.AbilityData_Affect2DamageP5 = ""
                                                End If
                                            End If
                                        ElseIf AbilityType = "Speed" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect2TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect2TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Summon" Then
                                            If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "%") Then
                                                If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "HP") Then
                                                    MainProgram.AbilityData_Affect2DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect2DamageP2 = ""
                                                    MainProgram.AbilityData_Affect2DamageP3 = ""
                                                    MainProgram.AbilityData_Affect2DamageP4 = ""
                                                    MainProgram.AbilityData_Affect2DamageP5 = ""
                                                ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "WP") Then
                                                    MainProgram.AbilityData_Affect2DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect2DamageP2 = ""
                                                    MainProgram.AbilityData_Affect2DamageP3 = "" 'change for expansion later
                                                    MainProgram.AbilityData_Affect2DamageP4 = ""
                                                    MainProgram.AbilityData_Affect2DamageP5 = ""
                                                Else
                                                    MainProgram.AbilityData_Affect2DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect2DamageP2 = ""
                                                    MainProgram.AbilityData_Affect2DamageP3 = ""
                                                    MainProgram.AbilityData_Affect2DamageP4 = ""
                                                    MainProgram.AbilityData_Affect2DamageP5 = ""
                                                End If
                                            ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "+") Then
                                                Dim tmp4 As Integer, tmpa As String = Mid(mscstr, tempvar4, tempvar3 - tempvar4), tmpstep As Integer = 0, tmp5 As Integer
                                                For tmp4 = 1 To Len(tmpa) Step 1
                                                    If Mid(tmpa, tmp4, 1) = "d" Then
                                                        MainProgram.AbilityData_Affect2DamageP1 = Mid(tmpa, 1, tmp4 - 1)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 1) = "+" Then
                                                        MainProgram.AbilityData_Affect2DamageP2 = Mid(tmpa, tmp5 - 1, tmp4 - tmp5 + 1)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 1) = "." Then
                                                        MainProgram.AbilityData_Affect2DamageP4 = Mid(tmpa, tmp5, tmp4 - tmp5)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 2) = "HP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect2DamageP5 = "HP"
                                                        Exit For
                                                    ElseIf Mid(tmpa, tmp4, 2) = "WP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect2DamageP5 = "WP"
                                                        Exit For
                                                    ElseIf Mid(tmpa, tmp4, 2) = "SP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect2DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect2DamageP5 = "SP"
                                                        Exit For
                                                    End If
                                                Next
                                            Else
                                                If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "HP") Then
                                                    MainProgram.AbilityData_Affect2DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect2DamageP2 = ""
                                                    MainProgram.AbilityData_Affect2DamageP3 = ""
                                                    MainProgram.AbilityData_Affect2DamageP4 = ""
                                                    MainProgram.AbilityData_Affect2DamageP5 = ""
                                                ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "WP") Then
                                                    MainProgram.AbilityData_Affect2DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect2DamageP2 = ""
                                                    MainProgram.AbilityData_Affect2DamageP3 = "" 'expand this later
                                                    MainProgram.AbilityData_Affect2DamageP4 = ""
                                                    MainProgram.AbilityData_Affect2DamageP5 = ""
                                                Else
                                                    MainProgram.AbilityData_Affect2DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect2DamageP2 = ""
                                                    MainProgram.AbilityData_Affect2DamageP3 = ""
                                                    MainProgram.AbilityData_Affect2DamageP4 = ""
                                                    MainProgram.AbilityData_Affect2DamageP5 = ""
                                                End If
                                            End If
                                        ElseIf AbilityType = "Stats Modifier" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect2ModifierType = "Strength"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect2ModifierType = "Dexterity"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect2ModifierType = "Intelligence"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect2ModifierType = "Wisdom"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "4" Then
                                                MainProgram.AbilityData_Affect2ModifierType = "Charisma"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "5" Then
                                                MainProgram.AbilityData_Affect2ModifierType = "Luck"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "6" Then
                                                MainProgram.AbilityData_Affect2ModifierType = "Bash Armor Class"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "7" Then
                                                MainProgram.AbilityData_Affect2ModifierType = "Slash Armor Class"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "8" Then
                                                MainProgram.AbilityData_Affect2ModifierType = "Pierce Armor Class"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "9" Then
                                                MainProgram.AbilityData_Affect2ModifierType = "Fist Armor Class"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "10" Then
                                                MainProgram.AbilityData_Affect2ModifierType = "Exotic Armor Class"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "11" Then
                                                MainProgram.AbilityData_Affect2ModifierType = "Natural Armor Class"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "12" Then
                                                MainProgram.AbilityData_Affect2ModifierType = "Fire Resistance"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "13" Then
                                                MainProgram.AbilityData_Affect2ModifierType = "Water Resistance"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "14" Then
                                                MainProgram.AbilityData_Affect2ModifierType = "Air Resistance"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "15" Then
                                                MainProgram.AbilityData_Affect2ModifierType = "Earth Resistance"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "16" Then
                                                MainProgram.AbilityData_Affect2ModifierType = "Spirit Resistance"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "17" Then
                                                MainProgram.AbilityData_Affect2ModifierType = "Sub-elemental Fire Resistance"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "18" Then
                                                MainProgram.AbilityData_Affect2ModifierType = "Sub-elemental Water Resistance"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "19" Then
                                                MainProgram.AbilityData_Affect2ModifierType = "Sub-elemental Air Resistance"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "20" Then
                                                MainProgram.AbilityData_Affect2ModifierType = "Sub-elemental Earth Resistance"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "21" Then
                                                MainProgram.AbilityData_Affect2ModifierType = "Sub-elemental Spirit Resistance"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "22" Then
                                                MainProgram.AbilityData_Affect2ModifierType = "Fire Amplitude"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "23" Then
                                                MainProgram.AbilityData_Affect2ModifierType = "Water Amplitude"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "24" Then
                                                MainProgram.AbilityData_Affect2ModifierType = "Air Amplitude"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "25" Then
                                                MainProgram.AbilityData_Affect2ModifierType = "Earth Amplitude"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "26" Then
                                                MainProgram.AbilityData_Affect2ModifierType = "Spirit Amplitude"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "27" Then
                                                MainProgram.AbilityData_Affect2ModifierType = "Sub-elemental Fire Amplitude"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "28" Then
                                                MainProgram.AbilityData_Affect2ModifierType = "Sub-elemental Water Amplitude"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "29" Then
                                                MainProgram.AbilityData_Affect2ModifierType = "Sub-elemental Air Amplitude"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "30" Then
                                                MainProgram.AbilityData_Affect2ModifierType = "Sub-elemental Earth Amplitude"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "31" Then
                                                MainProgram.AbilityData_Affect2ModifierType = "Sub-elemental Spirit Amplitude"
                                            End If
                                        ElseIf AbilityType = "Aura" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect2TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect2TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Fear" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect2TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect2TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Cripple" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect2TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect2TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Stun" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect2TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect2TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Cure" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect2TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect2TimedType = "Not Instant"
                                            End If
                                        End If
                                        tempvar4 = tempvar3 + 1
                                        stepnum += 1
                                    ElseIf stepnum = 3 Then
                                        If AbilityType = "Damaging" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Healing" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Blind" Then
                                            MainProgram.AbilityData_Affect2TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Silence" Then
                                            MainProgram.AbilityData_Affect2TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Poison" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Disease" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect2TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Speed" Then
                                            MainProgram.AbilityData_Affect2TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Summon" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect2TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect2TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Stats Modifier" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect2TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect2TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Aura" Then
                                            MainProgram.AbilityData_Affect2TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Fear" Then
                                            MainProgram.AbilityData_Affect2TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Cripple" Then
                                            MainProgram.AbilityData_Affect2TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Stun" Then
                                            MainProgram.AbilityData_Affect2TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Cure" Then
                                            MainProgram.AbilityData_Affect2TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        End If
                                        tempvar4 = tempvar3 + 1
                                        stepnum += 1
                                    ElseIf stepnum = 4 Then
                                        If AbilityType = "Damaging" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect2TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect2TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Healing" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect2TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect2TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Poison" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect2TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect2TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Disease" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect2TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect2TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Summon" Then
                                            MainProgram.AbilityData_Affect2TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Stats Modifier" Then
                                            MainProgram.AbilityData_Affect2TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        End If
                                        tempvar4 = tempvar3 + 1
                                        stepnum += 1
                                    ElseIf stepnum = 5 Then
                                        If AbilityType = "Damaging" Then
                                            MainProgram.AbilityData_Affect2TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Healing" Then
                                            MainProgram.AbilityData_Affect2TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Poison" Then
                                            MainProgram.AbilityData_Affect2TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Disease" Then
                                            MainProgram.AbilityData_Affect2TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Summon" Then
                                            Dim tmp4 As Integer, tmpa As String = Mid(mscstr, tempvar4, tempvar3 - tempvar4), tmpstep As Integer = 0, tmp5 As Integer
                                            For tmp4 = 1 To Len(tmpa) + 1 Step 1
                                                If Mid(tmpa + ".", tmp4, 1) = "." And tmpstep = 0 Then
                                                    MainProgram.AbilityData_Affect2SummonHP = Mid(tmpa, 1, tmp4 - 1)
                                                    tmpstep += 1
                                                    tmp5 = tmp4 + 1
                                                ElseIf Mid(tmpa + ".", tmp4, 1) = "." And tmpstep = 1 Then
                                                    MainProgram.AbilityData_Affect2SummonWP = Mid(tmpa, tmp5, tmp4 - tmp5)
                                                    tmpstep += 1
                                                    tmp5 = tmp4 + 1
                                                ElseIf Mid(tmpa + ".", tmp4, 1) = "." And tmpstep = 2 Then
                                                    MainProgram.AbilityData_Affect2SummonSP = Mid(tmpa, tmp5, tmp4 - tmp5)
                                                    tmpstep += 1
                                                    tmp5 = tmp4 + 1
                                                    Exit For
                                                End If
                                            Next
                                        End If
                                        tempvar4 = tempvar3 + 1
                                        stepnum += 1
                                    End If
                                End If
                            Next
                            Exit For
                        End If
                    Next
                End If
                tempvar = InStr(MainProgram.AbilityData, "AFFE3#" + AbilityVIRID + "(")
                If tempvar > 0 Then
                    For tempvar2 = InStr(MainProgram.AbilityData, "AFFE3#" + AbilityVIRID + "(") To Len(MainProgram.AbilityData) Step 1
                        If Mid(MainProgram.AbilityData, tempvar2, 1) = ")" Then
                            mscstr = Mid(MainProgram.AbilityData, InStr(MainProgram.AbilityData, "AFFE3#" + AbilityVIRID + "(") + 7 + Len(AbilityVIRID), tempvar2 - InStr(MainProgram.AbilityData, "AFFE3#" + AbilityVIRID + "(") - 7 - Len(AbilityVIRID))
                            Dim AbilityType As String = ""
                            stepnum = 0
                            For tempvar3 = 1 To Len(mscstr) + 1 Step 1
                                If Mid(mscstr + ",", tempvar3, 1) = "," Then
                                    If stepnum = 0 Then
                                        If Mid(mscstr, 1, tempvar3 - 1) = "00" Then
                                            MainProgram.AbilityData_Affect3Type = "Damaging"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "01" Then
                                            MainProgram.AbilityData_Affect3Type = "Healing"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "02" Then
                                            MainProgram.AbilityData_Affect3Type = "Blind"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "03" Then
                                            MainProgram.AbilityData_Affect3Type = "Silence"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "04" Then
                                            MainProgram.AbilityData_Affect3Type = "Poison"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "05" Then
                                            MainProgram.AbilityData_Affect3Type = "Disease"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "06" Then
                                            MainProgram.AbilityData_Affect3Type = "Speed"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "07" Then
                                            MainProgram.AbilityData_Affect3Type = "Summon"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "08" Then
                                            MainProgram.AbilityData_Affect3Type = "Stats Modifier"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "09" Then
                                            MainProgram.AbilityData_Affect3Type = "Aura"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "10" Then
                                            MainProgram.AbilityData_Affect3Type = "Fear"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "11" Then
                                            MainProgram.AbilityData_Affect3Type = "Cripple"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "12" Then
                                            MainProgram.AbilityData_Affect3Type = "Stun"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "13" Then
                                            MainProgram.AbilityData_Affect3Type = "Cure"
                                        End If
                                        tempvar4 = tempvar3 + 1
                                        stepnum += 1
                                    ElseIf stepnum = 1 Then
                                        If AbilityType = "Damaging" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Bash"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Slash"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Pierce"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Fist"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "4" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Exotic"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "5" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Physical"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "6" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Fire"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "7" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Water"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "8" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Air"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "9" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Earth"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "10" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Spirit"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "11" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Sub-elemental Fire"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "12" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Sub-elemental Water"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "13" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Sub-elemental Air"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "14" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Sub-elemental Earth"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "15" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Sub-elementalSpirit"
                                            End If
                                        ElseIf AbilityType = "Healing" Then
                                            If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "%") Then
                                                If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "HP") Then
                                                    MainProgram.AbilityData_Affect3DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect3DamageP2 = ""
                                                    MainProgram.AbilityData_Affect3DamageP3 = ""
                                                    MainProgram.AbilityData_Affect3DamageP4 = ""
                                                    MainProgram.AbilityData_Affect3DamageP5 = ""
                                                ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "WP") Then
                                                    MainProgram.AbilityData_Affect3DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect3DamageP2 = ""
                                                    MainProgram.AbilityData_Affect3DamageP3 = "" 'change for expansion later
                                                    MainProgram.AbilityData_Affect3DamageP4 = ""
                                                    MainProgram.AbilityData_Affect3DamageP5 = ""
                                                Else
                                                    MainProgram.AbilityData_Affect3DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect3DamageP2 = ""
                                                    MainProgram.AbilityData_Affect3DamageP3 = ""
                                                    MainProgram.AbilityData_Affect3DamageP4 = ""
                                                    MainProgram.AbilityData_Affect3DamageP5 = ""
                                                End If
                                            ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "+") Then
                                                Dim tmp4 As Integer, tmpa As String = Mid(mscstr, tempvar4, tempvar3 - tempvar4), tmpstep As Integer = 0, tmp5 As Integer
                                                For tmp4 = 1 To Len(tmpa) Step 1
                                                    If Mid(tmpa, tmp4, 1) = "d" Then
                                                        MainProgram.AbilityData_Affect3DamageP1 = Mid(tmpa, 1, tmp4 - 1)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 1) = "+" Then
                                                        MainProgram.AbilityData_Affect3DamageP2 = Mid(tmpa, tmp5 - 1, tmp4 - tmp5 + 1)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 1) = "." Then
                                                        MainProgram.AbilityData_Affect3DamageP4 = Mid(tmpa, tmp5, tmp4 - tmp5)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 2) = "HP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect3DamageP5 = "HP"
                                                        Exit For
                                                    ElseIf Mid(tmpa, tmp4, 2) = "WP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect3DamageP5 = "WP"
                                                        Exit For
                                                    ElseIf Mid(tmpa, tmp4, 2) = "SP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect3DamageP5 = "SP"
                                                        Exit For
                                                    End If
                                                Next
                                            Else
                                                If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "HP") Then
                                                    MainProgram.AbilityData_Affect3DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect3DamageP2 = ""
                                                    MainProgram.AbilityData_Affect3DamageP3 = ""
                                                    MainProgram.AbilityData_Affect3DamageP4 = ""
                                                    MainProgram.AbilityData_Affect3DamageP5 = ""
                                                ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "WP") Then
                                                    MainProgram.AbilityData_Affect3DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect3DamageP2 = ""
                                                    MainProgram.AbilityData_Affect3DamageP3 = "" 'expand this later
                                                    MainProgram.AbilityData_Affect3DamageP4 = ""
                                                    MainProgram.AbilityData_Affect3DamageP5 = ""
                                                Else
                                                    MainProgram.AbilityData_Affect3DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect3DamageP2 = ""
                                                    MainProgram.AbilityData_Affect3DamageP3 = ""
                                                    MainProgram.AbilityData_Affect3DamageP4 = ""
                                                    MainProgram.AbilityData_Affect3DamageP5 = ""
                                                End If
                                            End If
                                        ElseIf AbilityType = "Blind" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Silence" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Poison" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Bash"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Slash"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Pierce"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Fist"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "4" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Exotic"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "5" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Physical"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "6" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Fire"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "7" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Water"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "8" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Air"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "9" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Earth"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "10" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Spirit"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "11" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Sub-elemental Fire"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "12" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Sub-elemental Water"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "13" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Sub-elemental Air"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "14" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Sub-elemental Earth"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "15" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Sub-elementalSpirit"
                                            End If
                                        ElseIf AbilityType = "Disease" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Bash"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Slash"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Pierce"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Fist"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "4" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Exotic"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "5" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Physical"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "6" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Fire"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "7" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Water"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "8" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Air"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "9" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Earth"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "10" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Spirit"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "11" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Sub-elemental Fire"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "12" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Sub-elemental Water"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "13" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Sub-elemental Air"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "14" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Sub-elemental Earth"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "15" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Sub-elementalSpirit"
                                            End If
                                        ElseIf AbilityType = "Speed" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Summon" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Bash"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Slash"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Pierce"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Fist"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "4" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Exotic"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "5" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Physical"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "6" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Fire"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "7" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Water"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "8" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Air"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "9" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Earth"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "10" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Spirit"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "11" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Sub-elemental Fire"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "12" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Sub-elemental Water"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "13" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Sub-elemental Air"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "14" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Sub-elemental Earth"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "15" Then
                                                MainProgram.AbilityData_Affect3DamageType = "Sub-elementalSpirit"
                                            End If
                                        ElseIf AbilityType = "Stats Modifier" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Aura" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Fear" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Cripple" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Stun" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Cure" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Sector"
                                            End If
                                        End If
                                        tempvar4 = tempvar3 + 1
                                        stepnum += 1
                                    ElseIf stepnum = 2 Then
                                        If AbilityType = "Damaging" Then
                                            If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "%") Then
                                                If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "HP") Then
                                                    MainProgram.AbilityData_Affect3DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect3DamageP2 = ""
                                                    MainProgram.AbilityData_Affect3DamageP3 = ""
                                                    MainProgram.AbilityData_Affect3DamageP4 = ""
                                                    MainProgram.AbilityData_Affect3DamageP5 = ""
                                                ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "WP") Then
                                                    MainProgram.AbilityData_Affect3DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect3DamageP2 = ""
                                                    MainProgram.AbilityData_Affect3DamageP3 = "" 'change for expansion later
                                                    MainProgram.AbilityData_Affect3DamageP4 = ""
                                                    MainProgram.AbilityData_Affect3DamageP5 = ""
                                                Else
                                                    MainProgram.AbilityData_Affect3DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect3DamageP2 = ""
                                                    MainProgram.AbilityData_Affect3DamageP3 = ""
                                                    MainProgram.AbilityData_Affect3DamageP4 = ""
                                                    MainProgram.AbilityData_Affect3DamageP5 = ""
                                                End If
                                            ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "+") Then
                                                Dim tmp4 As Integer, tmpa As String = Mid(mscstr, tempvar4, tempvar3 - tempvar4), tmpstep As Integer = 0, tmp5 As Integer
                                                For tmp4 = 1 To Len(tmpa) Step 1
                                                    If Mid(tmpa, tmp4, 1) = "d" Then
                                                        MainProgram.AbilityData_Affect3DamageP1 = Mid(tmpa, 1, tmp4 - 1)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 1) = "+" Then
                                                        MainProgram.AbilityData_Affect3DamageP2 = Mid(tmpa, tmp5 - 1, tmp4 - tmp5 + 1)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 1) = "." Then
                                                        MainProgram.AbilityData_Affect3DamageP4 = Mid(tmpa, tmp5, tmp4 - tmp5)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 2) = "HP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect3DamageP5 = "HP"
                                                        Exit For
                                                    ElseIf Mid(tmpa, tmp4, 2) = "WP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect3DamageP5 = "WP"
                                                        Exit For
                                                    ElseIf Mid(tmpa, tmp4, 2) = "SP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect3DamageP5 = "SP"
                                                        Exit For
                                                    End If
                                                Next
                                            Else
                                                If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "HP") Then
                                                    MainProgram.AbilityData_Affect3DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect3DamageP2 = ""
                                                    MainProgram.AbilityData_Affect3DamageP3 = ""
                                                    MainProgram.AbilityData_Affect3DamageP4 = ""
                                                    MainProgram.AbilityData_Affect3DamageP5 = ""
                                                ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "WP") Then
                                                    MainProgram.AbilityData_Affect3DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect3DamageP2 = ""
                                                    MainProgram.AbilityData_Affect3DamageP3 = "" 'expand this later
                                                    MainProgram.AbilityData_Affect3DamageP4 = ""
                                                    MainProgram.AbilityData_Affect3DamageP5 = ""
                                                Else
                                                    MainProgram.AbilityData_Affect3DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect3DamageP2 = ""
                                                    MainProgram.AbilityData_Affect3DamageP3 = ""
                                                    MainProgram.AbilityData_Affect3DamageP4 = ""
                                                    MainProgram.AbilityData_Affect3DamageP5 = ""
                                                End If
                                            End If
                                        ElseIf AbilityType = "Healing" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect3HealingType = "Living"
                                            Else
                                                MainProgram.AbilityData_Affect3HealingType = "Dead"
                                            End If
                                        ElseIf AbilityType = "Blind" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect3TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect3TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Silence" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect3TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect3TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Poison" Then
                                            If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "%") Then
                                                If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "HP") Then
                                                    MainProgram.AbilityData_Affect3DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect3DamageP2 = ""
                                                    MainProgram.AbilityData_Affect3DamageP3 = ""
                                                    MainProgram.AbilityData_Affect3DamageP4 = ""
                                                    MainProgram.AbilityData_Affect3DamageP5 = ""
                                                ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "WP") Then
                                                    MainProgram.AbilityData_Affect3DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect3DamageP2 = ""
                                                    MainProgram.AbilityData_Affect3DamageP3 = "" 'change for expansion later
                                                    MainProgram.AbilityData_Affect3DamageP4 = ""
                                                    MainProgram.AbilityData_Affect3DamageP5 = ""
                                                Else
                                                    MainProgram.AbilityData_Affect3DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect3DamageP2 = ""
                                                    MainProgram.AbilityData_Affect3DamageP3 = ""
                                                    MainProgram.AbilityData_Affect3DamageP4 = ""
                                                    MainProgram.AbilityData_Affect3DamageP5 = ""
                                                End If
                                            ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "+") Then
                                                Dim tmp4 As Integer, tmpa As String = Mid(mscstr, tempvar4, tempvar3 - tempvar4), tmpstep As Integer = 0, tmp5 As Integer
                                                For tmp4 = 1 To Len(tmpa) Step 1
                                                    If Mid(tmpa, tmp4, 1) = "d" Then
                                                        MainProgram.AbilityData_Affect3DamageP1 = Mid(tmpa, 1, tmp4 - 1)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 1) = "+" Then
                                                        MainProgram.AbilityData_Affect3DamageP2 = Mid(tmpa, tmp5 - 1, tmp4 - tmp5 + 1)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 1) = "." Then
                                                        MainProgram.AbilityData_Affect3DamageP4 = Mid(tmpa, tmp5, tmp4 - tmp5)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 2) = "HP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect3DamageP5 = "HP"
                                                        Exit For
                                                    ElseIf Mid(tmpa, tmp4, 2) = "WP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect3DamageP5 = "WP"
                                                        Exit For
                                                    ElseIf Mid(tmpa, tmp4, 2) = "SP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect3DamageP5 = "SP"
                                                        Exit For
                                                    End If
                                                Next
                                            Else
                                                If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "HP") Then
                                                    MainProgram.AbilityData_Affect3DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect3DamageP2 = ""
                                                    MainProgram.AbilityData_Affect3DamageP3 = ""
                                                    MainProgram.AbilityData_Affect3DamageP4 = ""
                                                    MainProgram.AbilityData_Affect3DamageP5 = ""
                                                ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "WP") Then
                                                    MainProgram.AbilityData_Affect3DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect3DamageP2 = ""
                                                    MainProgram.AbilityData_Affect3DamageP3 = "" 'expand this later
                                                    MainProgram.AbilityData_Affect3DamageP4 = ""
                                                    MainProgram.AbilityData_Affect3DamageP5 = ""
                                                Else
                                                    MainProgram.AbilityData_Affect3DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect3DamageP2 = ""
                                                    MainProgram.AbilityData_Affect3DamageP3 = ""
                                                    MainProgram.AbilityData_Affect3DamageP4 = ""
                                                    MainProgram.AbilityData_Affect3DamageP5 = ""
                                                End If
                                            End If
                                        ElseIf AbilityType = "Disease" Then
                                            If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "%") Then
                                                If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "HP") Then
                                                    MainProgram.AbilityData_Affect3DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect3DamageP2 = ""
                                                    MainProgram.AbilityData_Affect3DamageP3 = ""
                                                    MainProgram.AbilityData_Affect3DamageP4 = ""
                                                    MainProgram.AbilityData_Affect3DamageP5 = ""
                                                ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "WP") Then
                                                    MainProgram.AbilityData_Affect3DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect3DamageP2 = ""
                                                    MainProgram.AbilityData_Affect3DamageP3 = "" 'change for expansion later
                                                    MainProgram.AbilityData_Affect3DamageP4 = ""
                                                    MainProgram.AbilityData_Affect3DamageP5 = ""
                                                Else
                                                    MainProgram.AbilityData_Affect3DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect3DamageP2 = ""
                                                    MainProgram.AbilityData_Affect3DamageP3 = ""
                                                    MainProgram.AbilityData_Affect3DamageP4 = ""
                                                    MainProgram.AbilityData_Affect3DamageP5 = ""
                                                End If
                                            ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "+") Then
                                                Dim tmp4 As Integer, tmpa As String = Mid(mscstr, tempvar4, tempvar3 - tempvar4), tmpstep As Integer = 0, tmp5 As Integer
                                                For tmp4 = 1 To Len(tmpa) Step 1
                                                    If Mid(tmpa, tmp4, 1) = "d" Then
                                                        MainProgram.AbilityData_Affect3DamageP1 = Mid(tmpa, 1, tmp4 - 1)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 1) = "+" Then
                                                        MainProgram.AbilityData_Affect3DamageP2 = Mid(tmpa, tmp5 - 1, tmp4 - tmp5 + 1)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 1) = "." Then
                                                        MainProgram.AbilityData_Affect3DamageP4 = Mid(tmpa, tmp5, tmp4 - tmp5)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 2) = "HP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect3DamageP5 = "HP"
                                                        Exit For
                                                    ElseIf Mid(tmpa, tmp4, 2) = "WP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect3DamageP5 = "WP"
                                                        Exit For
                                                    ElseIf Mid(tmpa, tmp4, 2) = "SP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect3DamageP5 = "SP"
                                                        Exit For
                                                    End If
                                                Next
                                            Else
                                                If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "HP") Then
                                                    MainProgram.AbilityData_Affect3DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect3DamageP2 = ""
                                                    MainProgram.AbilityData_Affect3DamageP3 = ""
                                                    MainProgram.AbilityData_Affect3DamageP4 = ""
                                                    MainProgram.AbilityData_Affect3DamageP5 = ""
                                                ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "WP") Then
                                                    MainProgram.AbilityData_Affect3DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect3DamageP2 = ""
                                                    MainProgram.AbilityData_Affect3DamageP3 = "" 'expand this later
                                                    MainProgram.AbilityData_Affect3DamageP4 = ""
                                                    MainProgram.AbilityData_Affect3DamageP5 = ""
                                                Else
                                                    MainProgram.AbilityData_Affect3DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect3DamageP2 = ""
                                                    MainProgram.AbilityData_Affect3DamageP3 = ""
                                                    MainProgram.AbilityData_Affect3DamageP4 = ""
                                                    MainProgram.AbilityData_Affect3DamageP5 = ""
                                                End If
                                            End If
                                        ElseIf AbilityType = "Speed" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect3TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect3TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Summon" Then
                                            If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "%") Then
                                                If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "HP") Then
                                                    MainProgram.AbilityData_Affect3DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect3DamageP2 = ""
                                                    MainProgram.AbilityData_Affect3DamageP3 = ""
                                                    MainProgram.AbilityData_Affect3DamageP4 = ""
                                                    MainProgram.AbilityData_Affect3DamageP5 = ""
                                                ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "WP") Then
                                                    MainProgram.AbilityData_Affect3DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect3DamageP2 = ""
                                                    MainProgram.AbilityData_Affect3DamageP3 = "" 'change for expansion later
                                                    MainProgram.AbilityData_Affect3DamageP4 = ""
                                                    MainProgram.AbilityData_Affect3DamageP5 = ""
                                                Else
                                                    MainProgram.AbilityData_Affect3DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect3DamageP2 = ""
                                                    MainProgram.AbilityData_Affect3DamageP3 = ""
                                                    MainProgram.AbilityData_Affect3DamageP4 = ""
                                                    MainProgram.AbilityData_Affect3DamageP5 = ""
                                                End If
                                            ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "+") Then
                                                Dim tmp4 As Integer, tmpa As String = Mid(mscstr, tempvar4, tempvar3 - tempvar4), tmpstep As Integer = 0, tmp5 As Integer
                                                For tmp4 = 1 To Len(tmpa) Step 1
                                                    If Mid(tmpa, tmp4, 1) = "d" Then
                                                        MainProgram.AbilityData_Affect3DamageP1 = Mid(tmpa, 1, tmp4 - 1)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 1) = "+" Then
                                                        MainProgram.AbilityData_Affect3DamageP2 = Mid(tmpa, tmp5 - 1, tmp4 - tmp5 + 1)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 1) = "." Then
                                                        MainProgram.AbilityData_Affect3DamageP4 = Mid(tmpa, tmp5, tmp4 - tmp5)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 2) = "HP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect3DamageP5 = "HP"
                                                        Exit For
                                                    ElseIf Mid(tmpa, tmp4, 2) = "WP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect3DamageP5 = "WP"
                                                        Exit For
                                                    ElseIf Mid(tmpa, tmp4, 2) = "SP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect3DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect3DamageP5 = "SP"
                                                        Exit For
                                                    End If
                                                Next
                                            Else
                                                If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "HP") Then
                                                    MainProgram.AbilityData_Affect3DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect3DamageP2 = ""
                                                    MainProgram.AbilityData_Affect3DamageP3 = ""
                                                    MainProgram.AbilityData_Affect3DamageP4 = ""
                                                    MainProgram.AbilityData_Affect3DamageP5 = ""
                                                ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "WP") Then
                                                    MainProgram.AbilityData_Affect3DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect3DamageP2 = ""
                                                    MainProgram.AbilityData_Affect3DamageP3 = "" 'expand this later
                                                    MainProgram.AbilityData_Affect3DamageP4 = ""
                                                    MainProgram.AbilityData_Affect3DamageP5 = ""
                                                Else
                                                    MainProgram.AbilityData_Affect3DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect3DamageP2 = ""
                                                    MainProgram.AbilityData_Affect3DamageP3 = ""
                                                    MainProgram.AbilityData_Affect3DamageP4 = ""
                                                    MainProgram.AbilityData_Affect3DamageP5 = ""
                                                End If
                                            End If
                                        ElseIf AbilityType = "Stats Modifier" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect3ModifierType = "Strength"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect3ModifierType = "Dexterity"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect3ModifierType = "Intelligence"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect3ModifierType = "Wisdom"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "4" Then
                                                MainProgram.AbilityData_Affect3ModifierType = "Charisma"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "5" Then
                                                MainProgram.AbilityData_Affect3ModifierType = "Luck"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "6" Then
                                                MainProgram.AbilityData_Affect3ModifierType = "Bash Armor Class"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "7" Then
                                                MainProgram.AbilityData_Affect3ModifierType = "Slash Armor Class"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "8" Then
                                                MainProgram.AbilityData_Affect3ModifierType = "Pierce Armor Class"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "9" Then
                                                MainProgram.AbilityData_Affect3ModifierType = "Fist Armor Class"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "10" Then
                                                MainProgram.AbilityData_Affect3ModifierType = "Exotic Armor Class"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "11" Then
                                                MainProgram.AbilityData_Affect3ModifierType = "Natural Armor Class"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "12" Then
                                                MainProgram.AbilityData_Affect3ModifierType = "Fire Resistance"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "13" Then
                                                MainProgram.AbilityData_Affect3ModifierType = "Water Resistance"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "14" Then
                                                MainProgram.AbilityData_Affect3ModifierType = "Air Resistance"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "15" Then
                                                MainProgram.AbilityData_Affect3ModifierType = "Earth Resistance"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "16" Then
                                                MainProgram.AbilityData_Affect3ModifierType = "Spirit Resistance"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "17" Then
                                                MainProgram.AbilityData_Affect3ModifierType = "Sub-elemental Fire Resistance"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "18" Then
                                                MainProgram.AbilityData_Affect3ModifierType = "Sub-elemental Water Resistance"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "19" Then
                                                MainProgram.AbilityData_Affect3ModifierType = "Sub-elemental Air Resistance"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "20" Then
                                                MainProgram.AbilityData_Affect3ModifierType = "Sub-elemental Earth Resistance"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "21" Then
                                                MainProgram.AbilityData_Affect3ModifierType = "Sub-elemental Spirit Resistance"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "22" Then
                                                MainProgram.AbilityData_Affect3ModifierType = "Fire Amplitude"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "23" Then
                                                MainProgram.AbilityData_Affect3ModifierType = "Water Amplitude"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "24" Then
                                                MainProgram.AbilityData_Affect3ModifierType = "Air Amplitude"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "25" Then
                                                MainProgram.AbilityData_Affect3ModifierType = "Earth Amplitude"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "26" Then
                                                MainProgram.AbilityData_Affect3ModifierType = "Spirit Amplitude"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "27" Then
                                                MainProgram.AbilityData_Affect3ModifierType = "Sub-elemental Fire Amplitude"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "28" Then
                                                MainProgram.AbilityData_Affect3ModifierType = "Sub-elemental Water Amplitude"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "29" Then
                                                MainProgram.AbilityData_Affect3ModifierType = "Sub-elemental Air Amplitude"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "30" Then
                                                MainProgram.AbilityData_Affect3ModifierType = "Sub-elemental Earth Amplitude"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "31" Then
                                                MainProgram.AbilityData_Affect3ModifierType = "Sub-elemental Spirit Amplitude"
                                            End If
                                        ElseIf AbilityType = "Aura" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect3TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect3TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Fear" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect3TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect3TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Cripple" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect3TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect3TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Stun" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect3TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect3TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Cure" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect3TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect3TimedType = "Not Instant"
                                            End If
                                        End If
                                        tempvar4 = tempvar3 + 1
                                        stepnum += 1
                                    ElseIf stepnum = 3 Then
                                        If AbilityType = "Damaging" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Healing" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Blind" Then
                                            MainProgram.AbilityData_Affect3TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Silence" Then
                                            MainProgram.AbilityData_Affect3TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Poison" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Disease" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect3TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Speed" Then
                                            MainProgram.AbilityData_Affect3TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Summon" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect3TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect3TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Stats Modifier" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect3TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect3TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Aura" Then
                                            MainProgram.AbilityData_Affect3TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Fear" Then
                                            MainProgram.AbilityData_Affect3TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Cripple" Then
                                            MainProgram.AbilityData_Affect3TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Stun" Then
                                            MainProgram.AbilityData_Affect3TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Cure" Then
                                            MainProgram.AbilityData_Affect3TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        End If
                                        tempvar4 = tempvar3 + 1
                                        stepnum += 1
                                    ElseIf stepnum = 4 Then
                                        If AbilityType = "Damaging" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect3TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect3TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Healing" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect3TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect3TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Poison" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect3TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect3TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Disease" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect3TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect3TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Summon" Then
                                            MainProgram.AbilityData_Affect3TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Stats Modifier" Then
                                            MainProgram.AbilityData_Affect3TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        End If
                                        tempvar4 = tempvar3 + 1
                                        stepnum += 1
                                    ElseIf stepnum = 5 Then
                                        If AbilityType = "Damaging" Then
                                            MainProgram.AbilityData_Affect3TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Healing" Then
                                            MainProgram.AbilityData_Affect3TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Poison" Then
                                            MainProgram.AbilityData_Affect3TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Disease" Then
                                            MainProgram.AbilityData_Affect3TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Summon" Then
                                            Dim tmp4 As Integer, tmpa As String = Mid(mscstr, tempvar4, tempvar3 - tempvar4), tmpstep As Integer = 0, tmp5 As Integer
                                            For tmp4 = 1 To Len(tmpa) + 1 Step 1
                                                If Mid(tmpa + ".", tmp4, 1) = "." And tmpstep = 0 Then
                                                    MainProgram.AbilityData_Affect3SummonHP = Mid(tmpa, 1, tmp4 - 1)
                                                    tmpstep += 1
                                                    tmp5 = tmp4 + 1
                                                ElseIf Mid(tmpa + ".", tmp4, 1) = "." And tmpstep = 1 Then
                                                    MainProgram.AbilityData_Affect3SummonWP = Mid(tmpa, tmp5, tmp4 - tmp5)
                                                    tmpstep += 1
                                                    tmp5 = tmp4 + 1
                                                ElseIf Mid(tmpa + ".", tmp4, 1) = "." And tmpstep = 2 Then
                                                    MainProgram.AbilityData_Affect3SummonSP = Mid(tmpa, tmp5, tmp4 - tmp5)
                                                    tmpstep += 1
                                                    tmp5 = tmp4 + 1
                                                    Exit For
                                                End If
                                            Next
                                        End If
                                        tempvar4 = tempvar3 + 1
                                        stepnum += 1
                                    End If
                                End If
                            Next
                            Exit For
                        End If
                    Next
                End If
                tempvar = InStr(MainProgram.AbilityData, "AFFE4#" + AbilityVIRID + "(")
                If tempvar > 0 Then
                    For tempvar2 = InStr(MainProgram.AbilityData, "AFFE4#" + AbilityVIRID + "(") To Len(MainProgram.AbilityData) Step 1
                        If Mid(MainProgram.AbilityData, tempvar2, 1) = ")" Then
                            mscstr = Mid(MainProgram.AbilityData, InStr(MainProgram.AbilityData, "AFFE4#" + AbilityVIRID + "(") + 7 + Len(AbilityVIRID), tempvar2 - InStr(MainProgram.AbilityData, "AFFE4#" + AbilityVIRID + "(") - 7 - Len(AbilityVIRID))
                            Dim AbilityType As String = ""
                            stepnum = 0
                            For tempvar3 = 1 To Len(mscstr) + 1 Step 1
                                If Mid(mscstr + ",", tempvar3, 1) = "," Then
                                    If stepnum = 0 Then
                                        If Mid(mscstr, 1, tempvar3 - 1) = "00" Then
                                            MainProgram.AbilityData_Affect4Type = "Damaging"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "01" Then
                                            MainProgram.AbilityData_Affect4Type = "Healing"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "02" Then
                                            MainProgram.AbilityData_Affect4Type = "Blind"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "03" Then
                                            MainProgram.AbilityData_Affect4Type = "Silence"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "04" Then
                                            MainProgram.AbilityData_Affect4Type = "Poison"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "05" Then
                                            MainProgram.AbilityData_Affect4Type = "Disease"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "06" Then
                                            MainProgram.AbilityData_Affect4Type = "Speed"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "07" Then
                                            MainProgram.AbilityData_Affect4Type = "Summon"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "08" Then
                                            MainProgram.AbilityData_Affect4Type = "Stats Modifier"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "09" Then
                                            MainProgram.AbilityData_Affect4Type = "Aura"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "10" Then
                                            MainProgram.AbilityData_Affect4Type = "Fear"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "11" Then
                                            MainProgram.AbilityData_Affect4Type = "Cripple"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "12" Then
                                            MainProgram.AbilityData_Affect4Type = "Stun"
                                        ElseIf Mid(mscstr, 1, tempvar3 - 1) = "13" Then
                                            MainProgram.AbilityData_Affect4Type = "Cure"
                                        End If
                                        tempvar4 = tempvar3 + 1
                                        stepnum += 1
                                    ElseIf stepnum = 1 Then
                                        If AbilityType = "Damaging" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Bash"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Slash"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Pierce"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Fist"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "4" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Exotic"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "5" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Physical"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "6" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Fire"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "7" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Water"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "8" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Air"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "9" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Earth"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "10" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Spirit"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "11" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Sub-elemental Fire"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "12" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Sub-elemental Water"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "13" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Sub-elemental Air"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "14" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Sub-elemental Earth"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "15" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Sub-elementalSpirit"
                                            End If
                                        ElseIf AbilityType = "Healing" Then
                                            If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "%") Then
                                                If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "HP") Then
                                                    MainProgram.AbilityData_Affect4DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect4DamageP2 = ""
                                                    MainProgram.AbilityData_Affect4DamageP3 = ""
                                                    MainProgram.AbilityData_Affect4DamageP4 = ""
                                                    MainProgram.AbilityData_Affect4DamageP5 = ""
                                                ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "WP") Then
                                                    MainProgram.AbilityData_Affect4DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect4DamageP2 = ""
                                                    MainProgram.AbilityData_Affect4DamageP3 = "" 'change for expansion later
                                                    MainProgram.AbilityData_Affect4DamageP4 = ""
                                                    MainProgram.AbilityData_Affect4DamageP5 = ""
                                                Else
                                                    MainProgram.AbilityData_Affect4DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect4DamageP2 = ""
                                                    MainProgram.AbilityData_Affect4DamageP3 = ""
                                                    MainProgram.AbilityData_Affect4DamageP4 = ""
                                                    MainProgram.AbilityData_Affect4DamageP5 = ""
                                                End If
                                            ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "+") Then
                                                Dim tmp4 As Integer, tmpa As String = Mid(mscstr, tempvar4, tempvar3 - tempvar4), tmpstep As Integer = 0, tmp5 As Integer
                                                For tmp4 = 1 To Len(tmpa) Step 1
                                                    If Mid(tmpa, tmp4, 1) = "d" Then
                                                        MainProgram.AbilityData_Affect4DamageP1 = Mid(tmpa, 1, tmp4 - 1)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 1) = "+" Then
                                                        MainProgram.AbilityData_Affect4DamageP2 = Mid(tmpa, tmp5 - 1, tmp4 - tmp5 + 1)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 1) = "." Then
                                                        MainProgram.AbilityData_Affect4DamageP4 = Mid(tmpa, tmp5, tmp4 - tmp5)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 2) = "HP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect4DamageP5 = "HP"
                                                        Exit For
                                                    ElseIf Mid(tmpa, tmp4, 2) = "WP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect4DamageP5 = "WP"
                                                        Exit For
                                                    ElseIf Mid(tmpa, tmp4, 2) = "SP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect4DamageP5 = "SP"
                                                        Exit For
                                                    End If
                                                Next
                                            Else
                                                If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "HP") Then
                                                    MainProgram.AbilityData_Affect4DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect4DamageP2 = ""
                                                    MainProgram.AbilityData_Affect4DamageP3 = ""
                                                    MainProgram.AbilityData_Affect4DamageP4 = ""
                                                    MainProgram.AbilityData_Affect4DamageP5 = ""
                                                ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "WP") Then
                                                    MainProgram.AbilityData_Affect4DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect4DamageP2 = ""
                                                    MainProgram.AbilityData_Affect4DamageP3 = "" 'expand this later
                                                    MainProgram.AbilityData_Affect4DamageP4 = ""
                                                    MainProgram.AbilityData_Affect4DamageP5 = ""
                                                Else
                                                    MainProgram.AbilityData_Affect4DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect4DamageP2 = ""
                                                    MainProgram.AbilityData_Affect4DamageP3 = ""
                                                    MainProgram.AbilityData_Affect4DamageP4 = ""
                                                    MainProgram.AbilityData_Affect4DamageP5 = ""
                                                End If
                                            End If
                                        ElseIf AbilityType = "Blind" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Silence" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Poison" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Bash"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Slash"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Pierce"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Fist"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "4" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Exotic"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "5" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Physical"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "6" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Fire"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "7" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Water"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "8" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Air"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "9" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Earth"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "10" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Spirit"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "11" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Sub-elemental Fire"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "12" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Sub-elemental Water"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "13" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Sub-elemental Air"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "14" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Sub-elemental Earth"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "15" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Sub-elementalSpirit"
                                            End If
                                        ElseIf AbilityType = "Disease" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Bash"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Slash"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Pierce"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Fist"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "4" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Exotic"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "5" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Physical"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "6" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Fire"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "7" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Water"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "8" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Air"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "9" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Earth"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "10" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Spirit"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "11" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Sub-elemental Fire"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "12" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Sub-elemental Water"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "13" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Sub-elemental Air"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "14" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Sub-elemental Earth"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "15" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Sub-elementalSpirit"
                                            End If
                                        ElseIf AbilityType = "Speed" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Summon" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Bash"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Slash"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Pierce"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Fist"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "4" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Exotic"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "5" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Physical"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "6" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Fire"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "7" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Water"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "8" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Air"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "9" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Earth"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "10" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Spirit"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "11" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Sub-elemental Fire"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "12" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Sub-elemental Water"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "13" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Sub-elemental Air"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "14" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Sub-elemental Earth"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "15" Then
                                                MainProgram.AbilityData_Affect4DamageType = "Sub-elementalSpirit"
                                            End If
                                        ElseIf AbilityType = "Stats Modifier" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Aura" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Fear" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Cripple" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Stun" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Cure" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Sector"
                                            End If
                                        End If
                                        tempvar4 = tempvar3 + 1
                                        stepnum += 1
                                    ElseIf stepnum = 2 Then
                                        If AbilityType = "Damaging" Then
                                            If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "%") Then
                                                If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "HP") Then
                                                    MainProgram.AbilityData_Affect4DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect4DamageP2 = ""
                                                    MainProgram.AbilityData_Affect4DamageP3 = ""
                                                    MainProgram.AbilityData_Affect4DamageP4 = ""
                                                    MainProgram.AbilityData_Affect4DamageP5 = ""
                                                ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "WP") Then
                                                    MainProgram.AbilityData_Affect4DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect4DamageP2 = ""
                                                    MainProgram.AbilityData_Affect4DamageP3 = "" 'change for expansion later
                                                    MainProgram.AbilityData_Affect4DamageP4 = ""
                                                    MainProgram.AbilityData_Affect4DamageP5 = ""
                                                Else
                                                    MainProgram.AbilityData_Affect4DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect4DamageP2 = ""
                                                    MainProgram.AbilityData_Affect4DamageP3 = ""
                                                    MainProgram.AbilityData_Affect4DamageP4 = ""
                                                    MainProgram.AbilityData_Affect4DamageP5 = ""
                                                End If
                                            ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "+") Then
                                                Dim tmp4 As Integer, tmpa As String = Mid(mscstr, tempvar4, tempvar3 - tempvar4), tmpstep As Integer = 0, tmp5 As Integer
                                                For tmp4 = 1 To Len(tmpa) Step 1
                                                    If Mid(tmpa, tmp4, 1) = "d" Then
                                                        MainProgram.AbilityData_Affect4DamageP1 = Mid(tmpa, 1, tmp4 - 1)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 1) = "+" Then
                                                        MainProgram.AbilityData_Affect4DamageP2 = Mid(tmpa, tmp5 - 1, tmp4 - tmp5 + 1)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 1) = "." Then
                                                        MainProgram.AbilityData_Affect4DamageP4 = Mid(tmpa, tmp5, tmp4 - tmp5)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 2) = "HP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect4DamageP5 = "HP"
                                                        Exit For
                                                    ElseIf Mid(tmpa, tmp4, 2) = "WP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect4DamageP5 = "WP"
                                                        Exit For
                                                    ElseIf Mid(tmpa, tmp4, 2) = "SP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect4DamageP5 = "SP"
                                                        Exit For
                                                    End If
                                                Next
                                            Else
                                                If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "HP") Then
                                                    MainProgram.AbilityData_Affect4DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect4DamageP2 = ""
                                                    MainProgram.AbilityData_Affect4DamageP3 = ""
                                                    MainProgram.AbilityData_Affect4DamageP4 = ""
                                                    MainProgram.AbilityData_Affect4DamageP5 = ""
                                                ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "WP") Then
                                                    MainProgram.AbilityData_Affect4DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect4DamageP2 = ""
                                                    MainProgram.AbilityData_Affect4DamageP3 = "" 'expand this later
                                                    MainProgram.AbilityData_Affect4DamageP4 = ""
                                                    MainProgram.AbilityData_Affect4DamageP5 = ""
                                                Else
                                                    MainProgram.AbilityData_Affect4DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect4DamageP2 = ""
                                                    MainProgram.AbilityData_Affect4DamageP3 = ""
                                                    MainProgram.AbilityData_Affect4DamageP4 = ""
                                                    MainProgram.AbilityData_Affect4DamageP5 = ""
                                                End If
                                            End If
                                        ElseIf AbilityType = "Healing" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect4HealingType = "Living"
                                            Else
                                                MainProgram.AbilityData_Affect4HealingType = "Dead"
                                            End If
                                        ElseIf AbilityType = "Blind" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect4TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect4TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Silence" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect4TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect4TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Poison" Then
                                            If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "%") Then
                                                If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "HP") Then
                                                    MainProgram.AbilityData_Affect4DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect4DamageP2 = ""
                                                    MainProgram.AbilityData_Affect4DamageP3 = ""
                                                    MainProgram.AbilityData_Affect4DamageP4 = ""
                                                    MainProgram.AbilityData_Affect4DamageP5 = ""
                                                ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "WP") Then
                                                    MainProgram.AbilityData_Affect4DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect4DamageP2 = ""
                                                    MainProgram.AbilityData_Affect4DamageP3 = "" 'change for expansion later
                                                    MainProgram.AbilityData_Affect4DamageP4 = ""
                                                    MainProgram.AbilityData_Affect4DamageP5 = ""
                                                Else
                                                    MainProgram.AbilityData_Affect4DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect4DamageP2 = ""
                                                    MainProgram.AbilityData_Affect4DamageP3 = ""
                                                    MainProgram.AbilityData_Affect4DamageP4 = ""
                                                    MainProgram.AbilityData_Affect4DamageP5 = ""
                                                End If
                                            ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "+") Then
                                                Dim tmp4 As Integer, tmpa As String = Mid(mscstr, tempvar4, tempvar3 - tempvar4), tmpstep As Integer = 0, tmp5 As Integer
                                                For tmp4 = 1 To Len(tmpa) Step 1
                                                    If Mid(tmpa, tmp4, 1) = "d" Then
                                                        MainProgram.AbilityData_Affect4DamageP1 = Mid(tmpa, 1, tmp4 - 1)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 1) = "+" Then
                                                        MainProgram.AbilityData_Affect4DamageP2 = Mid(tmpa, tmp5 - 1, tmp4 - tmp5 + 1)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 1) = "." Then
                                                        MainProgram.AbilityData_Affect4DamageP4 = Mid(tmpa, tmp5, tmp4 - tmp5)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 2) = "HP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect4DamageP5 = "HP"
                                                        Exit For
                                                    ElseIf Mid(tmpa, tmp4, 2) = "WP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect4DamageP5 = "WP"
                                                        Exit For
                                                    ElseIf Mid(tmpa, tmp4, 2) = "SP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect4DamageP5 = "SP"
                                                        Exit For
                                                    End If
                                                Next
                                            Else
                                                If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "HP") Then
                                                    MainProgram.AbilityData_Affect4DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect4DamageP2 = ""
                                                    MainProgram.AbilityData_Affect4DamageP3 = ""
                                                    MainProgram.AbilityData_Affect4DamageP4 = ""
                                                    MainProgram.AbilityData_Affect4DamageP5 = ""
                                                ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "WP") Then
                                                    MainProgram.AbilityData_Affect4DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect4DamageP2 = ""
                                                    MainProgram.AbilityData_Affect4DamageP3 = "" 'expand this later
                                                    MainProgram.AbilityData_Affect4DamageP4 = ""
                                                    MainProgram.AbilityData_Affect4DamageP5 = ""
                                                Else
                                                    MainProgram.AbilityData_Affect4DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect4DamageP2 = ""
                                                    MainProgram.AbilityData_Affect4DamageP3 = ""
                                                    MainProgram.AbilityData_Affect4DamageP4 = ""
                                                    MainProgram.AbilityData_Affect4DamageP5 = ""
                                                End If
                                            End If
                                        ElseIf AbilityType = "Disease" Then
                                            If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "%") Then
                                                If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "HP") Then
                                                    MainProgram.AbilityData_Affect4DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect4DamageP2 = ""
                                                    MainProgram.AbilityData_Affect4DamageP3 = ""
                                                    MainProgram.AbilityData_Affect4DamageP4 = ""
                                                    MainProgram.AbilityData_Affect4DamageP5 = ""
                                                ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "WP") Then
                                                    MainProgram.AbilityData_Affect4DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect4DamageP2 = ""
                                                    MainProgram.AbilityData_Affect4DamageP3 = "" 'change for expansion later
                                                    MainProgram.AbilityData_Affect4DamageP4 = ""
                                                    MainProgram.AbilityData_Affect4DamageP5 = ""
                                                Else
                                                    MainProgram.AbilityData_Affect4DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect4DamageP2 = ""
                                                    MainProgram.AbilityData_Affect4DamageP3 = ""
                                                    MainProgram.AbilityData_Affect4DamageP4 = ""
                                                    MainProgram.AbilityData_Affect4DamageP5 = ""
                                                End If
                                            ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "+") Then
                                                Dim tmp4 As Integer, tmpa As String = Mid(mscstr, tempvar4, tempvar3 - tempvar4), tmpstep As Integer = 0, tmp5 As Integer
                                                For tmp4 = 1 To Len(tmpa) Step 1
                                                    If Mid(tmpa, tmp4, 1) = "d" Then
                                                        MainProgram.AbilityData_Affect4DamageP1 = Mid(tmpa, 1, tmp4 - 1)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 1) = "+" Then
                                                        MainProgram.AbilityData_Affect4DamageP2 = Mid(tmpa, tmp5 - 1, tmp4 - tmp5 + 1)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 1) = "." Then
                                                        MainProgram.AbilityData_Affect4DamageP4 = Mid(tmpa, tmp5, tmp4 - tmp5)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 2) = "HP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect4DamageP5 = "HP"
                                                        Exit For
                                                    ElseIf Mid(tmpa, tmp4, 2) = "WP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect4DamageP5 = "WP"
                                                        Exit For
                                                    ElseIf Mid(tmpa, tmp4, 2) = "SP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect4DamageP5 = "SP"
                                                        Exit For
                                                    End If
                                                Next
                                            Else
                                                If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "HP") Then
                                                    MainProgram.AbilityData_Affect4DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect4DamageP2 = ""
                                                    MainProgram.AbilityData_Affect4DamageP3 = ""
                                                    MainProgram.AbilityData_Affect4DamageP4 = ""
                                                    MainProgram.AbilityData_Affect4DamageP5 = ""
                                                ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "WP") Then
                                                    MainProgram.AbilityData_Affect4DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect4DamageP2 = ""
                                                    MainProgram.AbilityData_Affect4DamageP3 = "" 'expand this later
                                                    MainProgram.AbilityData_Affect4DamageP4 = ""
                                                    MainProgram.AbilityData_Affect4DamageP5 = ""
                                                Else
                                                    MainProgram.AbilityData_Affect4DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect4DamageP2 = ""
                                                    MainProgram.AbilityData_Affect4DamageP3 = ""
                                                    MainProgram.AbilityData_Affect4DamageP4 = ""
                                                    MainProgram.AbilityData_Affect4DamageP5 = ""
                                                End If
                                            End If
                                        ElseIf AbilityType = "Speed" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect4TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect4TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Summon" Then
                                            If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "%") Then
                                                If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "HP") Then
                                                    MainProgram.AbilityData_Affect4DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect4DamageP2 = ""
                                                    MainProgram.AbilityData_Affect4DamageP3 = ""
                                                    MainProgram.AbilityData_Affect4DamageP4 = ""
                                                    MainProgram.AbilityData_Affect4DamageP5 = ""
                                                ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "WP") Then
                                                    MainProgram.AbilityData_Affect4DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect4DamageP2 = ""
                                                    MainProgram.AbilityData_Affect4DamageP3 = "" 'change for expansion later
                                                    MainProgram.AbilityData_Affect4DamageP4 = ""
                                                    MainProgram.AbilityData_Affect4DamageP5 = ""
                                                Else
                                                    MainProgram.AbilityData_Affect4DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect4DamageP2 = ""
                                                    MainProgram.AbilityData_Affect4DamageP3 = ""
                                                    MainProgram.AbilityData_Affect4DamageP4 = ""
                                                    MainProgram.AbilityData_Affect4DamageP5 = ""
                                                End If
                                            ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "+") Then
                                                Dim tmp4 As Integer, tmpa As String = Mid(mscstr, tempvar4, tempvar3 - tempvar4), tmpstep As Integer = 0, tmp5 As Integer
                                                For tmp4 = 1 To Len(tmpa) Step 1
                                                    If Mid(tmpa, tmp4, 1) = "d" Then
                                                        MainProgram.AbilityData_Affect4DamageP1 = Mid(tmpa, 1, tmp4 - 1)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 1) = "+" Then
                                                        MainProgram.AbilityData_Affect4DamageP2 = Mid(tmpa, tmp5 - 1, tmp4 - tmp5 + 1)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 1) = "." Then
                                                        MainProgram.AbilityData_Affect4DamageP4 = Mid(tmpa, tmp5, tmp4 - tmp5)
                                                        tmpstep += 1
                                                        tmp5 = tmp4 + 1
                                                    ElseIf Mid(tmpa, tmp4, 2) = "HP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect4DamageP5 = "HP"
                                                        Exit For
                                                    ElseIf Mid(tmpa, tmp4, 2) = "WP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect4DamageP5 = "WP"
                                                        Exit For
                                                    ElseIf Mid(tmpa, tmp4, 2) = "SP" Then
                                                        If Mid(tmpa, tmp5, tmp4 - tmp5) = "0" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Nothing"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "1" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Strength"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "2" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Dexterity"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "3" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Constitution"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "4" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Intelligence"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "5" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Wisdom"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "6" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Charisma"
                                                        ElseIf Mid(tmpa, tmp5, tmp4 - tmp5) = "7" Then
                                                            MainProgram.AbilityData_Affect4DamageP3 = "Luck"
                                                        End If
                                                        MainProgram.AbilityData_Affect4DamageP5 = "SP"
                                                        Exit For
                                                    End If
                                                Next
                                            Else
                                                If InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "HP") Then
                                                    MainProgram.AbilityData_Affect4DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect4DamageP2 = ""
                                                    MainProgram.AbilityData_Affect4DamageP3 = ""
                                                    MainProgram.AbilityData_Affect4DamageP4 = ""
                                                    MainProgram.AbilityData_Affect4DamageP5 = ""
                                                ElseIf InStr(Mid(mscstr, tempvar4, tempvar3 - tempvar4), "WP") Then
                                                    MainProgram.AbilityData_Affect4DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect4DamageP2 = ""
                                                    MainProgram.AbilityData_Affect4DamageP3 = "" 'expand this later
                                                    MainProgram.AbilityData_Affect4DamageP4 = ""
                                                    MainProgram.AbilityData_Affect4DamageP5 = ""
                                                Else
                                                    MainProgram.AbilityData_Affect4DamageP1 = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                                    MainProgram.AbilityData_Affect4DamageP2 = ""
                                                    MainProgram.AbilityData_Affect4DamageP3 = ""
                                                    MainProgram.AbilityData_Affect4DamageP4 = ""
                                                    MainProgram.AbilityData_Affect4DamageP5 = ""
                                                End If
                                            End If
                                        ElseIf AbilityType = "Stats Modifier" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect4ModifierType = "Strength"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect4ModifierType = "Dexterity"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect4ModifierType = "Intelligence"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect4ModifierType = "Wisdom"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "4" Then
                                                MainProgram.AbilityData_Affect4ModifierType = "Charisma"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "5" Then
                                                MainProgram.AbilityData_Affect4ModifierType = "Luck"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "6" Then
                                                MainProgram.AbilityData_Affect4ModifierType = "Bash Armor Class"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "7" Then
                                                MainProgram.AbilityData_Affect4ModifierType = "Slash Armor Class"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "8" Then
                                                MainProgram.AbilityData_Affect4ModifierType = "Pierce Armor Class"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "9" Then
                                                MainProgram.AbilityData_Affect4ModifierType = "Fist Armor Class"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "10" Then
                                                MainProgram.AbilityData_Affect4ModifierType = "Exotic Armor Class"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "11" Then
                                                MainProgram.AbilityData_Affect4ModifierType = "Natural Armor Class"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "12" Then
                                                MainProgram.AbilityData_Affect4ModifierType = "Fire Resistance"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "13" Then
                                                MainProgram.AbilityData_Affect4ModifierType = "Water Resistance"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "14" Then
                                                MainProgram.AbilityData_Affect4ModifierType = "Air Resistance"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "15" Then
                                                MainProgram.AbilityData_Affect4ModifierType = "Earth Resistance"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "16" Then
                                                MainProgram.AbilityData_Affect4ModifierType = "Spirit Resistance"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "17" Then
                                                MainProgram.AbilityData_Affect4ModifierType = "Sub-elemental Fire Resistance"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "18" Then
                                                MainProgram.AbilityData_Affect4ModifierType = "Sub-elemental Water Resistance"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "19" Then
                                                MainProgram.AbilityData_Affect4ModifierType = "Sub-elemental Air Resistance"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "20" Then
                                                MainProgram.AbilityData_Affect4ModifierType = "Sub-elemental Earth Resistance"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "21" Then
                                                MainProgram.AbilityData_Affect4ModifierType = "Sub-elemental Spirit Resistance"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "22" Then
                                                MainProgram.AbilityData_Affect4ModifierType = "Fire Amplitude"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "23" Then
                                                MainProgram.AbilityData_Affect4ModifierType = "Water Amplitude"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "24" Then
                                                MainProgram.AbilityData_Affect4ModifierType = "Air Amplitude"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "25" Then
                                                MainProgram.AbilityData_Affect4ModifierType = "Earth Amplitude"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "26" Then
                                                MainProgram.AbilityData_Affect4ModifierType = "Spirit Amplitude"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "27" Then
                                                MainProgram.AbilityData_Affect4ModifierType = "Sub-elemental Fire Amplitude"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "28" Then
                                                MainProgram.AbilityData_Affect4ModifierType = "Sub-elemental Water Amplitude"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "29" Then
                                                MainProgram.AbilityData_Affect4ModifierType = "Sub-elemental Air Amplitude"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "30" Then
                                                MainProgram.AbilityData_Affect4ModifierType = "Sub-elemental Earth Amplitude"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "31" Then
                                                MainProgram.AbilityData_Affect4ModifierType = "Sub-elemental Spirit Amplitude"
                                            End If
                                        ElseIf AbilityType = "Aura" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect4TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect4TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Fear" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect4TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect4TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Cripple" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect4TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect4TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Stun" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect4TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect4TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Cure" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect4TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect4TimedType = "Not Instant"
                                            End If
                                        End If
                                        tempvar4 = tempvar3 + 1
                                        stepnum += 1
                                    ElseIf stepnum = 3 Then
                                        If AbilityType = "Damaging" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Healing" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Blind" Then
                                            MainProgram.AbilityData_Affect4TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Silence" Then
                                            MainProgram.AbilityData_Affect4TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Poison" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Disease" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Self"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "1" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Target"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "2" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Party"
                                            ElseIf Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "3" Then
                                                MainProgram.AbilityData_Affect4TargetType = "Sector"
                                            End If
                                        ElseIf AbilityType = "Speed" Then
                                            MainProgram.AbilityData_Affect4TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Summon" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect4TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect4TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Stats Modifier" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect4TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect4TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Aura" Then
                                            MainProgram.AbilityData_Affect4TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Fear" Then
                                            MainProgram.AbilityData_Affect4TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Cripple" Then
                                            MainProgram.AbilityData_Affect4TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Stun" Then
                                            MainProgram.AbilityData_Affect4TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Cure" Then
                                            MainProgram.AbilityData_Affect4TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        End If
                                        tempvar4 = tempvar3 + 1
                                        stepnum += 1
                                    ElseIf stepnum = 4 Then
                                        If AbilityType = "Damaging" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect4TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect4TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Healing" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect4TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect4TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Poison" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect4TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect4TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Disease" Then
                                            If Mid(mscstr, tempvar4, tempvar3 - tempvar4) = "0" Then
                                                MainProgram.AbilityData_Affect4TimedType = "Instant"
                                            Else
                                                MainProgram.AbilityData_Affect4TimedType = "Not Instant"
                                            End If
                                        ElseIf AbilityType = "Summon" Then
                                            MainProgram.AbilityData_Affect4TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Stats Modifier" Then
                                            MainProgram.AbilityData_Affect4TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        End If
                                        tempvar4 = tempvar3 + 1
                                        stepnum += 1
                                    ElseIf stepnum = 5 Then
                                        If AbilityType = "Damaging" Then
                                            MainProgram.AbilityData_Affect4TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Healing" Then
                                            MainProgram.AbilityData_Affect4TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Poison" Then
                                            MainProgram.AbilityData_Affect4TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Disease" Then
                                            MainProgram.AbilityData_Affect4TimeValue = Mid(mscstr, tempvar4, tempvar3 - tempvar4)
                                        ElseIf AbilityType = "Summon" Then
                                            Dim tmp4 As Integer, tmpa As String = Mid(mscstr, tempvar4, tempvar3 - tempvar4), tmpstep As Integer = 0, tmp5 As Integer
                                            For tmp4 = 1 To Len(tmpa) + 1 Step 1
                                                If Mid(tmpa + ".", tmp4, 1) = "." And tmpstep = 0 Then
                                                    MainProgram.AbilityData_Affect4SummonHP = Mid(tmpa, 1, tmp4 - 1)
                                                    tmpstep += 1
                                                    tmp5 = tmp4 + 1
                                                ElseIf Mid(tmpa + ".", tmp4, 1) = "." And tmpstep = 1 Then
                                                    MainProgram.AbilityData_Affect4SummonWP = Mid(tmpa, tmp5, tmp4 - tmp5)
                                                    tmpstep += 1
                                                    tmp5 = tmp4 + 1
                                                ElseIf Mid(tmpa + ".", tmp4, 1) = "." And tmpstep = 2 Then
                                                    MainProgram.AbilityData_Affect4SummonSP = Mid(tmpa, tmp5, tmp4 - tmp5)
                                                    tmpstep += 1
                                                    tmp5 = tmp4 + 1
                                                    Exit For
                                                End If
                                            Next
                                        End If
                                        tempvar4 = tempvar3 + 1
                                        stepnum += 1
                                    End If
                                End If
                            Next
                            Exit For
                        End If
                    Next
                End If
            End If
        Else
            Debug.WriteLine("Error retrieving file: " & MainProgram.sErr)
        End If
    End Sub
End Module
